Remove SynapseError substitutions
parent
64b1d36436
commit
02b703c7d8
|
@ -1064,7 +1064,7 @@ def check_content_type_is_json(headers):
|
||||||
c_type = headers.getRawHeaders(b"Content-Type")
|
c_type = headers.getRawHeaders(b"Content-Type")
|
||||||
if c_type is None:
|
if c_type is None:
|
||||||
raise RequestSendFailed(
|
raise RequestSendFailed(
|
||||||
SynapseError(502, "No Content-Type header received from remote server"),
|
RuntimeError("No Content-Type header received from remote server"),
|
||||||
can_retry=False,
|
can_retry=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1072,8 +1072,7 @@ def check_content_type_is_json(headers):
|
||||||
val, options = cgi.parse_header(c_type)
|
val, options = cgi.parse_header(c_type)
|
||||||
if val != "application/json":
|
if val != "application/json":
|
||||||
raise RequestSendFailed(
|
raise RequestSendFailed(
|
||||||
SynapseError(
|
RuntimeError(
|
||||||
502,
|
|
||||||
"Remote server sent Content-Type header of '%s', not 'application/json'"
|
"Remote server sent Content-Type header of '%s', not 'application/json'"
|
||||||
% c_type,
|
% c_type,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue