mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 08:44:58 -04:00
Use HTTPStatus constants in place of literals in synapse.http
(#11543)
This commit is contained in:
parent
b47d10dc46
commit
941ebe49ff
4 changed files with 47 additions and 19 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue