summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-01-13 10:52:41 +0000
committerGitHub <noreply@github.com>2017-01-13 10:52:41 +0000
commit0d37a7bf831f218fdf60f42010a40a979f528ff2 (patch)
tree2995e1fbcf2bca44c9772fc8e65201e78f34909b /synapse
parentMerge pull request #1802 from matrix-org/erikj/remove_debug_deferreds (diff)
parentFix spurious Unhandled Error log lines (diff)
downloadsynapse-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.py6
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()