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
Assignees
Labels
breaking changes Change that can breaking existing code bug Bug or defect feature New functionality or improvement
Milestone

Comments

@hueniverse
Copy link
Contributor

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 feature New functionality or improvement bug Bug or defect breaking changes Change that can breaking existing code labels May 7, 2016
@hueniverse hueniverse added this to the 13.3.1 milestone 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.
Labels
breaking changes Change that can breaking existing code bug Bug or defect feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

1 participant