0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-14 14:01:59 +01:00

Better error message when failing to request from another process (#12060)

This commit is contained in:
Erik Johnston 2022-02-22 15:52:08 +00:00 committed by GitHub
parent 250104d357
commit 6d14b3dabf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

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

@ -0,0 +1 @@
Fix error message when a worker process fails to talk to another worker process.

View file

@ -268,7 +268,9 @@ class ReplicationEndpoint(metaclass=abc.ABCMeta):
raise e.to_synapse_error()
except Exception as e:
_outgoing_request_counter.labels(cls.NAME, "ERR").inc()
raise SynapseError(502, "Failed to talk to main process") from e
raise SynapseError(
502, f"Failed to talk to {instance_name} process"
) from e
_outgoing_request_counter.labels(cls.NAME, 200).inc()
return result