Compare commits

...

1 commit

Author SHA1 Message Date
Richard van der Hoff e2aa0b688c Log stacktraces when we fail to send a request to the main proc 2021-06-08 17:53:11 +01:00
2 changed files with 4 additions and 1 deletions

1
changelog.d/10144.misc Normal file
View file

@ -0,0 +1 @@
Log a stacktrace when we fail to send a request to the main process.

View file

@ -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