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

If any Middleware or Route throws an error, a 500 response should be returned - not a 200 #112

Closed
Badgerati opened this issue Oct 21, 2018 · 0 comments
Labels
Milestone

Comments

@Badgerati
Copy link
Owner

If any middleware or route logic throws an error currently, then a 200 response is returned. This issue is to change that so a 500 is returned instead, using status 500.

For middleware this can be done in the Invoke-PodeMiddleware function, within the catch of the try-catch. For routes this could be done within the catch of the try-catch in the WebServer - around line 156.

@Badgerati Badgerati added this to the 0.21.0 milestone Oct 22, 2018
Badgerati added a commit that referenced this issue Oct 23, 2018
Resolves #112: Middleware and Routes return 500 on errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant