Skip to content
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

[7.x] Unify response interface in handler and request interceptors (#42442) #42918

Merged
merged 1 commit into from Aug 8, 2019

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Aug 8, 2019

Backports the following commits to 7.x:

…#42442)

* add response factory to the interceptors

* adopt x-pack code to the changes

* Add a separate response factory for lifecycles.

Only route handler can respond with 2xx response.
Interceptors may redirect or reject an incoming request.

* re-generate docs

* response.internal --> response.internalError

* use internalError for exceptions in authenticator

* before Security plugin proxied ES error status code. now sets explicitly.

* provide error via message field of error response for BWC

* update docs

* add customError response

* restore integration test and update unit tests

* update docs

* support Hapi error format for BWC

* add a couple of tests
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@mshustov mshustov merged commit 26bd650 into elastic:7.x Aug 8, 2019
@mshustov mshustov deleted the backport/7.x/pr-42442 branch August 8, 2019 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants