summary refs log tree commit diff
path: root/synapse/util/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-04-15 10:31:17 +0100
committerErik Johnston <erik@matrix.org>2016-04-15 10:31:17 +0100
commit737aee9295c24375a49b49c153822baf06525e75 (patch)
treee5213f9befa5d15280a9bcfa2a35805992f1b2a0 /synapse/util/__init__.py
parentFix check_password rather than inverting the meaning of _check_local_password... (diff)
parentUse SynapseError 504 for Timeout errors (diff)
downloadsynapse-737aee9295c24375a49b49c153822baf06525e75.tar.xz
Merge pull request #731 from matrix-org/erikj/timed_otu
Use SynapseError 504 for Timeout errors
Diffstat (limited to 'synapse/util/__init__.py')
-rw-r--r--synapse/util/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py
index b462495eb8..2b3f0bef3c 100644
--- a/synapse/util/__init__.py
+++ b/synapse/util/__init__.py
@@ -13,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from synapse.api.errors import SynapseError
 from synapse.util.logcontext import PreserveLoggingContext
 
 from twisted.internet import defer, reactor, task
@@ -80,7 +81,7 @@ class Clock(object):
 
         def timed_out_fn():
             try:
-                ret_deferred.errback(RuntimeError("Timed out"))
+                ret_deferred.errback(SynapseError(504, "Timed out"))
             except:
                 pass