-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Display query errors from ElasticSearch #16940
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Hisham Bin Ateya <hishamco_2007@yahoo.com>
{ | ||
Type = "https://tools.ietf.org/html/rfc7231#section-6.6.1", | ||
Title = "An error occurred while processing your request.", | ||
Status = StatusCodes.Status500InternalServerError, |
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.
I think I would use a 400 for this one.
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.
We could also pass an error code along with the error string that we could document. Just to make a distinction between 500 and 400.
Currently Elastic Query run does not return errors. (Cost me a chunk of time when converting from lucene to elastic)
#16938
For discussion. Honestly not sure the best way to handle this.
Options:
ElasticQueryService rethrows to bubble error up to admin UI and to ApiExceptionHandlingFilter.
New ApiExceptionHandlingFilter to return nice problem details on API exception.
Swallow error on razor helper. Might need to do liquid filter too. Optionally could not swallow error and razor would return: