diff options
author | Erik Johnston <erikj@jki.re> | 2017-01-13 10:52:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-13 10:52:41 +0000 |
commit | 0d37a7bf831f218fdf60f42010a40a979f528ff2 (patch) | |
tree | 2995e1fbcf2bca44c9772fc8e65201e78f34909b /synapse | |
parent | Merge pull request #1802 from matrix-org/erikj/remove_debug_deferreds (diff) | |
parent | Fix spurious Unhandled Error log lines (diff) | |
download | synapse-0d37a7bf831f218fdf60f42010a40a979f528ff2.tar.xz |
Merge pull request #1803 from matrix-org/erikj/swallow_errors
Fix spurious Unhandled Error log lines
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/rest/client/transactions.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/rest/client/transactions.py b/synapse/rest/client/transactions.py index 351170edbc..efa77b8c51 100644 --- a/synapse/rest/client/transactions.py +++ b/synapse/rest/client/transactions.py @@ -86,7 +86,11 @@ class HttpTransactionCache(object): pass # execute the function instead. deferred = fn(*args, **kwargs) - observable = ObservableDeferred(deferred) + + # We don't add an errback to the raw deferred, so we ask ObservableDeferred + # to swallow the error. This is fine as the error will still be reported + # to the observers. + observable = ObservableDeferred(deferred, consumeErrors=True) self.transactions[txn_key] = (observable, self.clock.time_msec()) return observable.observe() |