-
Notifications
You must be signed in to change notification settings - Fork 121
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
Error handlers aren't working on apps #58
Comments
|
Your gist doesn't even run for me: This is because Klein uses type checking to determine if Line 249 in c8e74e7
The problem is that your exceptions subclass |
|
Thanks |
|
If either of you could contribute a chapter on error handling for the docs, that would be really amazing. |
|
Sure thing: #60 |
|
I was more thinking of a narrative explanation how error handling works in klein. :) TBH I didn’t know about A complete example like #60 is useful too of course. |
|
Oh right. Yeah, I'm not sure how I know about it, might've been from: https://github.com/twisted/klein/blob/master/klein/test/test_resource.py#L707 Anyway, I've updated the pull request with a new commit. So now it shows how to work with error handlers. |
|
JFTR, my wish has been fulfilled with #51 |
Here's my simple TODO app with basic error handling using your
handle_errorsdecorator: https://gist.github.com/SamuelMarks/9d7c796b8a336bb556f3Unfortunately it is always throwing 500s. Is there some other way I'm meant to be passing errors? E.g.: in Node.js most of my functions have the signature
(err, res).Thanks for all assistance
PS: The functions from line 103 to 110 was another attempt of mine to get exceptions handled
The text was updated successfully, but these errors were encountered: