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

feat: Add a new option to throw an error for x-cybozu-warning #304

merged 20 commits into from Jul 21, 2020


Copy link

@koba04 koba04 commented Jul 10, 2020


Currently, we don't have a way to handle the x-cybozu-warning header.

ref. #67


This PR adds a new option to handle the x-cybozu-warning header in the constructor of KintoneRestAPIClient.
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


  • Read
  • Updated documentation if it is required.
  • Added tests if it is required.
  • Passed yarn lint and yarn test on the root directory.

@koba04 koba04 marked this pull request as ready for review July 14, 2020 07:13
@koba04 koba04 requested a review from a team as a code owner July 14, 2020 07:13
@koba04 koba04 requested review from shisama and b4h0-c4t and removed request for a team July 14, 2020 07:13
Copy link
Member Author

koba04 commented Jul 14, 2020

I'm considering use console.warn even if the option is disabled.

Copy link

@b4h0-c4t b4h0-c4t left a 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.

packages/rest-api-client/ Outdated Show resolved Hide resolved
@b4h0-c4t b4h0-c4t merged commit cc9ae56 into master Jul 21, 2020
@b4h0-c4t b4h0-c4t deleted the feat-x-cybozu-waring branch July 21, 2020 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants