-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Cases] Limit category filter in find cases API #159989
Conversation
Pinging @elastic/response-ops-cases (Feature:Cases) |
Pinging @elastic/response-ops (Team:ResponseOps) |
9c08624
to
532f240
Compare
@@ -103,5 +104,15 @@ describe('find', () => { | |||
'Error: Invalid value "foobar" supplied to "searchFields"' | |||
); | |||
}); | |||
|
|||
it(`invalid category array with > ${MAX_CATEGORY_FILTER_LENGTH} items`, async () => { |
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.
nit: it(throws an error when the category array has...)
@@ -349,6 +349,12 @@ export default ({ getService }: FtrProviderContext): void => { | |||
}); | |||
}); | |||
|
|||
it('unhappy path - 400s when bad category field supplied', async () => { |
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.
nit: it('... 400s when more than the maximum category fields are supplied')
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.
API docs LGTM, thanks!
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @adcoelho |
Summary
This PR limits the number of categories by which we can filter calls to the find cases API.
The limit is now 100.