[Twisted-web] Double tracebacks for t.web & klein

Glyph glyph at twistedmatrix.com
Mon Sep 16 21:39:41 MDT 2013


On Sep 16, 2013, at 9:58 AM, Phil Mayers <p.mayers at imperial.ac.uk> wrote:

> I'm playing with klein for a simple rest API (because I like the routing, mainly).
> 
> When a method raises an exception, a traceback gets logged twice - once by the t.web Request.processingFailed, called from here:
> 
> https://github.com/twisted/klein/blob/master/klein/resource.py#L125
> 
> ...and once by the deferred garbage collection, as Request.processingFailed doesn't eat the deferred:
> 
> http://twistedmatrix.com/trac/browser/tags/releases/twisted-13.1.0/twisted/web/server.py#L314
> 
> Obviously this double-traceback thing is hugely irritating. Who is at fault here? Is t.web doing the right thing by returning the failure from processingFailed, or is klein doing the wrong thing, either by using the (undocumented) processingFailed or omitting an errback further down the chain?
> 
> Obviously there's no way for *me* to add an errback - klein generates the deferred for me.

Klein tracks bugs using Github.  First, you should file a bug :-).

<https://github.com/twisted/klein/issues>

-glyph




More information about the Twisted-web mailing list