This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Commit a312e89
authored
Cast errors generated during synapse_port_db to str (#8585)
I noticed in #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.1 parent 626b8f0 commit a312e89
2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | | - | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
635 | 636 | | |
636 | 637 | | |
637 | 638 | | |
638 | | - | |
| 639 | + | |
639 | 640 | | |
640 | 641 | | |
641 | 642 | | |
| |||
0 commit comments