Log stacktraces when we fail to send a request to the main proc
This commit is contained in:
parent
beb251e3ee
commit
e2aa0b688c
1
changelog.d/10144.misc
Normal file
1
changelog.d/10144.misc
Normal file
|
@ -0,0 +1 @@
|
|||
Log a stacktrace when we fail to send a request to the main process.
|
|
@ -255,8 +255,10 @@ class ReplicationEndpoint(metaclass=abc.ABCMeta):
|
|||
_outgoing_request_counter.labels(cls.NAME, e.code).inc()
|
||||
raise e.to_synapse_error()
|
||||
except Exception as e:
|
||||
# raise a generic exception rather than a SynapseError to make sure
|
||||
# we get a stacktrace for this one.
|
||||
_outgoing_request_counter.labels(cls.NAME, "ERR").inc()
|
||||
raise SynapseError(502, "Failed to talk to main process") from e
|
||||
raise RuntimeError("Failed to talk to main process") from e
|
||||
|
||||
_outgoing_request_counter.labels(cls.NAME, 200).inc()
|
||||
return result
|
||||
|
|
Loading…
Reference in a new issue