mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-12 04:52:26 +01:00
Use SynapseError 504 for Timeout errors
This commit is contained in:
parent
3c79bdd7a0
commit
cb9c465707
1 changed files with 2 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from synapse.api.errors import SynapseError
|
||||||
from synapse.util.logcontext import PreserveLoggingContext
|
from synapse.util.logcontext import PreserveLoggingContext
|
||||||
|
|
||||||
from twisted.internet import defer, reactor, task
|
from twisted.internet import defer, reactor, task
|
||||||
|
@ -80,7 +81,7 @@ class Clock(object):
|
||||||
|
|
||||||
def timed_out_fn():
|
def timed_out_fn():
|
||||||
try:
|
try:
|
||||||
ret_deferred.errback(RuntimeError("Timed out"))
|
ret_deferred.errback(SynapseError(504, "Timed out"))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue