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

Most status code handlers don't have a way of delegating to next() #251

Open
jfhbrook opened this issue Apr 13, 2019 · 1 comment
Open

Comments

@jfhbrook
Copy link
Owner

#247 flagged an issue where many (non-404) status codes aren't respecting handleError=false and always respond with an ecstatic-served error page.

I think error handling in ecstatic is a little bizarre anyway - see #154 and #183, which are both issues that request different error handling behavior. This is just yet another one, I guess.

@ronag
Copy link
Contributor

ronag commented Apr 14, 2019

Actually, I think it's not that bad. If we assume the following:

if next is thruthy, act like a middleware.
if next is falsy, act like a server.

Only the 400 handler needs to be fixed to actually forward to the next middleware.

Also, we have to make sure all the 500 cases are actually able to forward to next and properly consider handlError.

I've updated the 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

No branches or pull requests

2 participants