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

Resolve promise on size limit 'error' #8

Closed
wants to merge 1 commit into from

Conversation

davidjb
Copy link

@davidjb davidjb commented Oct 16, 2017

Previously, a SizeLimitExceededError (aka the "expected" result for setting a limit on number of results) would cause the Promise to be rejected. This PR adds a check on whether the search had a sizeLimit and if it did, then take the error as a signal to say "I'm done" and resolve instead. For downstream code, I added a hitSizeLimit flag on the result so it's possible to still resolve the Promise but still know whether the result set was caused by hitting the limit.

Looking at the list of errors (http://ldapjs.org/errors.html), this seems to be the only "error" that is actually a signal to success.

@davidjb
Copy link
Author

davidjb commented Nov 13, 2017

Closing as this PR was tied to master; reopened as #10.

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.

1 participant