summary refs log tree commit diff
path: root/synapse/http/matrixfederationclient.py
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2021-12-09 12:58:25 +0100
committerGitHub <noreply@github.com>2021-12-09 11:58:25 +0000
commit941ebe49ffc32c6d67b487094a6f8e1c290e93bc (patch)
treea08ac3d10e457acabbd8f01d04aabd92c6735db6 /synapse/http/matrixfederationclient.py
parentSupport unprefixed versions of fallback key property names. (#11541) (diff)
downloadsynapse-941ebe49ffc32c6d67b487094a6f8e1c290e93bc.tar.xz
Use HTTPStatus constants in place of literals in `synapse.http` (#11543)
Diffstat (limited to 'synapse/http/matrixfederationclient.py')
-rw-r--r--synapse/http/matrixfederationclient.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 203d723d41..deedde0b5b 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -19,6 +19,7 @@ import random
 import sys
 import typing
 import urllib.parse
+from http import HTTPStatus
 from io import BytesIO, StringIO
 from typing import (
     TYPE_CHECKING,
@@ -1154,7 +1155,7 @@ class MatrixFederationHttpClient:
                 request.destination,
                 msg,
             )
-            raise SynapseError(502, msg, Codes.TOO_LARGE)
+            raise SynapseError(HTTPStatus.BAD_GATEWAY, msg, Codes.TOO_LARGE)
         except defer.TimeoutError as e:
             logger.warning(
                 "{%s} [%s] Timed out reading response - %s %s",