0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-24 05:14:13 +01:00

Clarify error message when plugin config parsers raise an error (#8492)

This turns:

    Failed to parse config for 'myplugin': Exception('error message')

into:

    Failed to parse config for 'myplugin': error message.
This commit is contained in:
Richard van der Hoff 2020-10-08 11:10:15 +01:00 committed by GitHub
parent 1baa895310
commit b28bfd905d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

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

@ -0,0 +1 @@
Clarify error message when plugin config parsers raise an error.

View file

@ -36,7 +36,7 @@ def load_module(provider):
try:
provider_config = provider_class.parse_config(provider.get("config"))
except Exception as e:
raise ConfigError("Failed to parse config for %r: %r" % (provider["module"], e))
raise ConfigError("Failed to parse config for %r: %s" % (provider["module"], e))
return provider_class, provider_config