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

Pass original validation error if boom #3147

Closed
hueniverse opened this issue May 7, 2016 · 0 comments
Closed

Pass original validation error if boom #3147

hueniverse opened this issue May 7, 2016 · 0 comments

Comments

@hueniverse
Copy link
Contributor

@hueniverse hueniverse commented May 7, 2016

Previously, hapi would always override any validation error and return a 400. This changes it to keep the error object if it is a boom error with its own status code and pass that instead. Same error decorations apply.

It is considered a bug because it should have honored the returned error with its own status code already. It is an enhancement because it allows new use cases with returning custom errors in validation rules.

Is it marked as breaking because it might cause custom code not using joi rules but one that does use boom errors to return different error codes. However, it will still return an error and therefore this is published as a minor release, not a major.

@hueniverse hueniverse self-assigned this May 7, 2016
@hueniverse hueniverse added this to the 13.3.1 milestone May 7, 2016
@hueniverse hueniverse closed this in faacf02 May 7, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant