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

Allow throwing an error inside route handler when continueOnError is true #107

Closed
mdpx opened this issue Jul 5, 2020 · 0 comments · Fixed by #108
Closed

Allow throwing an error inside route handler when continueOnError is true #107

mdpx opened this issue Jul 5, 2020 · 0 comments · Fixed by #108

Comments

@mdpx
Copy link
Contributor

mdpx commented Jul 5, 2020

Hi!
came from #97 , created a sandbox that reproduces the problem -> sandbox.
note the difference between sending a request with correct type but invalid body and a request with wrong type.

it happens when you use a centralized error handling middleware and you throw a proper error in route handlers when ctx.invalid is set.

I think it should be supported and work like a charm so I did some brain work and came up with a solution, will open a pr for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant