From a312e890f5b5746f991b07970dd92d680e08dd4c Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Tue, 20 Oct 2020 11:47:24 +0100 Subject: Cast errors generated during synapse_port_db to str (#8585) I noticed in https://github.com/matrix-org/synapse/issues/8575 that the `end_error` variable in `synapse_port_db` is set to an `Exception`, even though later we expect it to be a `str`. This PR simply casts an exception raised to a string. I'm doing this instead of having `end_error` be of type exception as we explicitly set `end_error` to a str here: https://github.com/matrix-org/synapse/blob/d25eb8f3709965d0face01a041d5292490bf0139/scripts/synapse_port_db#L542-L547 This whole file could probably use some heavy refactoring, but until then at least this fix will prevent exception contents from being hidden from us and users. --- changelog.d/8585.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/8585.bugfix (limited to 'changelog.d') diff --git a/changelog.d/8585.bugfix b/changelog.d/8585.bugfix new file mode 100644 index 0000000000..e97e6ac1d8 --- /dev/null +++ b/changelog.d/8585.bugfix @@ -0,0 +1 @@ +Fix a bug that prevented errors encountered during execution of the `synapse_port_db` from being correctly printed. \ No newline at end of file -- cgit 1.4.1