twisted.web._auth.wrapper causes an "Unhandled error in Deferred"
|Reported by:||Alex||Owned by:|
branch-diff, diff-cov, branch-cov, buildbot
Whenever a deferred without any errbacks gets a Failure, the "Unhandled error in Deferred" warning is unconditionally generated.
Whenever an http.Request.notifyFinish() method is called, a new deferred is generated (rather than, eg., some common one is used). It is a duty of caller to add the proper errback to this deferred, to handle a scenario if the connection is suddenly dropped. If the errback is not added, the "Unhandled error in Deferred" warning is generated.
One of the built-in callers of notifyFinish (and in fact, at the moment, the only one) is ResourceWrapper.render() in HTTPAuthSessionWrapper._loginSucceeded() method in twisted.web._auth.wrapper module - it adds a callback to log out, but doesn't add any errbacks.