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
feat: Add a new option to throw an error for x-cybozu-warning #304
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…age in x-cybozu-warning
ab0113f
to
965cc99
Compare
…tedSearchResultError
I'm considering use |
b4h0-c4t
suggested changes
Jul 16, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I left a comment.
Co-authored-by: Hodaka Kasama <hodaka.origin.0524@gmail.com>
b4h0-c4t
approved these changes
Jul 21, 2020
koba04
pushed a commit
that referenced
this pull request
Jul 22, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
Currently, we don't have a way to handle the
x-cybozu-warning
header.ref. #67
What
This PR adds a new option to handle the
x-cybozu-warning
header in the constructor ofKintoneRestAPIClient
.When the option is enabled,
KintoneRestAPIClient
throws an error if a received response has the header with the message, "Filter aborted because of too many search results."I have not decided on the name of the option yet.
Why does
KintoneRestAPIClient
throw an error instead of a warning?Because the search results are aborted, so the response is not what we expect. We've considered it, but I didn't find out a valid use-case using the incomplete results.
We have a plan to make this option default at the next major release.
How to test
Checklist
yarn lint
andyarn test
on the root directory.