Skip to content

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

Merged
mshustov merged 1 commit intoelastic:7.xfrom
mshustov:backport/7.x/pr-42442
Aug 8, 2019
Merged

[7.x] Unify response interface in handler and request interceptors (#42442)#42918
mshustov merged 1 commit intoelastic:7.xfrom
mshustov:backport/7.x/pr-42442

Conversation

@mshustov
Copy link
Copy Markdown
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
@mshustov mshustov added the backport This PR is a backport of another PR label Aug 8, 2019
@elasticmachine
Copy link
Copy Markdown
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

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants