-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add exception to core.get to handle index_not_found & document not found #2156
Conversation
exceptions: [ | ||
{ | ||
statusCodes: [404] | ||
body: GetResult<TDocument> | ErrorResponseBase |
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.
Can you add a comment explaining that ErrorResponseBase
will be returned if the index doesn't exist, and GetResult
if the id doesn't exist, and in that case it will only contain "found": false, _id and _index?
And for the sake of nitpicking flip the two members of the union: start with the result for the unknown index and finish with the result for the unknown id 😉
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.
Documentation added!
The order is consistent with the existing exceptions in the rest of the specification; I suggest we keep it that way.
Following you can find the validation results for the API you have changed.
You can validate this API yourself by using the |
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.
LGTM!
…und (#2156) * Add exception to core.get to handle index_not_found & document not found * add documentation to get exception
…und (#2156) * Add exception to core.get to handle index_not_found & document not found * add documentation to get exception
…und (#2156) * Add exception to core.get to handle index_not_found & document not found * add documentation to get exception
…und (#2156) (#2157) * Add exception to core.get to handle index_not_found & document not found * add documentation to get exception Co-authored-by: Laurent Saint-Félix <[email protected]>
…und (#2156) (#2158) * Add exception to core.get to handle index_not_found & document not found * add documentation to get exception Co-authored-by: Laurent Saint-Félix <[email protected]>
…und (#2156) (#2159) * Add exception to core.get to handle index_not_found & document not found * add documentation to get exception Co-authored-by: Laurent Saint-Félix <[email protected]>
Found in elastic/go-elasticsearch#678 |
…und (#2156) * Add exception to core.get to handle index_not_found & document not found * add documentation to get exception
This adds an exception to the
core.get
response to handleindex_not_found_exception
and document not found.