diff options
author | Erik Johnston <erik@matrix.org> | 2017-01-12 17:19:47 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-01-12 17:19:47 +0000 |
commit | ebf94aff8d8cf6a6ed187b2c8e6aaa69f3912a48 (patch) | |
tree | 2995e1fbcf2bca44c9772fc8e65201e78f34909b | |
parent | Merge pull request #1802 from matrix-org/erikj/remove_debug_deferreds (diff) | |
download | synapse-ebf94aff8d8cf6a6ed187b2c8e6aaa69f3912a48.tar.xz |
Fix spurious Unhandled Error log lines
-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() |