-
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
Preserving boom error headers for index pattern exceptions #17725
Conversation
💔 Build Failed |
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.
Ah, damn — great find. When I initially added the same code (5009435) it was because Boom.wrap
started throwing when it received a "Boom object", so the test case was only focused on that. That's why I ended up removing it again when moving to Boom.boomify
in b19c823.
I don't think there are any problems with this approach in the short-term, but I agree that long-term #17724 would be a better approach.
LGTM
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.
Wow, I had no idea that Boom.boomify
would reinitialize the error.output
property completely... There might be other places this is necessary... but I'm happy with what you have here to address the index_patterns API specifically.
💔 Build Failed |
💚 Build Succeeded |
💚 Build Succeeded |
Fixes the specific situation outlined here: #9583
This PR does expose the entire Elasticsearch Boom error in the HTTP response, were we concerned about disclosing too much information when doing this previously that we switched to always wrapping it and only maintaining the error message and status code @kjbekkelund ?
A more holistic approach is explored here but it has it's short-comings.
"Release Note: Resolving issue with the index pattern APIs not responding with WWW-Authenticate headers on 401s which caused basic auth via Kibana to not work appropriately in some configurations"