Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

understand that null responses can be returned for the key/value array #2814

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sjpotter
Copy link
Contributor

@sjpotter sjpotter commented Aug 8, 2024

in #2772 users noted that we are throwing a javascript exception as we are trying to apply .length to a null and hence that fails.

we have 2 options. First, we can just elide these results from the response we give the user, but this wouldn't correspond to the ft.search documentation. Therefore, instead, as redis doesn't return a document, but a null, we should do the same, and return an empty null object for these documents. It's up to the user to handle them

fixes #2772

Description

Describe your pull request here


Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

@sjpotter sjpotter requested a review from leibale August 8, 2024 07:10
@sjpotter sjpotter assigned sjpotter and unassigned sjpotter Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FT.SEARCH: Cannot read properties of undefined (reading 'length')
1 participant