-
Notifications
You must be signed in to change notification settings - Fork 16
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
Better error handling #109
Comments
@rnons provided an example (see #124); quoting here:
|
We currently transform uncaught JavaScript exceptions to a 500 without any error message. Would it be better to crash the server and print the traceback to console? Would this direct users to catch errors themselves, or to use quality libraries that don't let uncaught exceptions through? |
@akheron I would prefer to come up with some modification to the httpure api which forces users to handle uncaught exceptions in routes. I don't think there's a way to guarantee routes themselves are exception free now that there's no row type for |
It's not possible to ensure that JavaScript exceptions have been caught on type level. There's a plan to do something about this in |
... and because it's not possible on type level, I don't really see a way to enforce this other than crashing the server. It seems to me that if the aforementioned change was made to |
So what I had in mind was that we would just catch all exceptions and pass them off to a user-defined handler; so essentially we would force users to write the exception handler. But the more I think about it, the more I think you're right: if there's no enforcement on the type level, then users are no better suited to handle exceptions than we are. The fact is, if an exception occurs, the system is in an unintended and unpredictable state and should be crashed. |
We need better sad-path handling. Things like:
The text was updated successfully, but these errors were encountered: