We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The "processing_failed" function calls log.err on any exception:
https://github.com/twisted/klein/blob/master/klein/resource.py#L125
...but it also calls t.web Request.processingFailed which also calls log.err:
https://github.com/twisted/twisted/blob/trunk/twisted/web/server.py#L314
But the failure is also passed to log.err when the Deferred is garbage-collected.
This means errors/tracebacks are logged twice - not useful.
The text was updated successfully, but these errors were encountered:
Actually that can't be quite right, because it calls return right after request.processingFailed. But I am seeing double-logging of tracebacks.
Sorry, something went wrong.
Ok, have checked the call stacks for the two log.err calls
One is in Request.processingFailed as above, the other is when the deferred is garbage-collected ("Unhandled error in deferred")
Since klein is generating the deferred for me here e.g.
@route('/foo') def func(request): return 'bar'
...gets wrapped by maybeDeferred, I can't add an errback to "eat" the deferred
@philmayers does the new handle_errors decorator let you achieve what you want? https://github.com/twisted/klein/blob/master/klein/app.py#L183
handle_errors
No comment from reporter: this probably is safe to close.
No branches or pull requests
The "processing_failed" function calls log.err on any exception:
https://github.com/twisted/klein/blob/master/klein/resource.py#L125
...but it also calls t.web Request.processingFailed which also calls log.err:https://github.com/twisted/twisted/blob/trunk/twisted/web/server.py#L314But the failure is also passed to log.err when the Deferred is garbage-collected.
This means errors/tracebacks are logged twice - not useful.
The text was updated successfully, but these errors were encountered: