forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate EQL search strategy requests without
ignore
client option
Previously (since elastic#77493), we had been leveraging the following facts: * EQL search endpoint returns syntax errors as a 400 response * ES client can specify an `ignore` option to opt out of the "throw unsuccessful responses" behavior in order to perform EQL "validation" in a normal, non-exception control flow. This commit effectively replaces that with a try/catch, where we no longer pass (nor _can_ pass) `ignore` to the search strategy, and instead indicate we'd like the "validation" behavior via a new `validate` param. When set to true, we will capture the 400 response and, if valid, return it as before; in all other situations that syntax error will result in an error response from the search strategy.
- Loading branch information
Showing
4 changed files
with
74 additions
and
28 deletions.
There are no files selected for viewing
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
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
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
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