diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2023-05-18 10:58:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 10:58:13 +0100 |
commit | e15aa00bc08f68c3a1c1b91f3a59e63554d7aa70 (patch) | |
tree | f1ac116b55a43e7adba042116202d322cd8bf178 | |
parent | Add a new admin API to create a new device for a user. (#15611) (diff) | |
download | synapse-e15aa00bc08f68c3a1c1b91f3a59e63554d7aa70.tar.xz |
Fix error message when `app_service_config_files` validation fails (#15614)
The second argument of `ConfigError` is a path, passed as an optional `Iterable[str]` and not a `str`. If a string is passed directly, Synapse unhelpfully emits "Error in configuration at a.p.p._.s.e.r.v.i.c.e._.c.o.n.f.i.g._.f.i.l.e.s'" when the config option has the wrong data type. Signed-off-by: Sean Quah <seanq@matrix.org>
Diffstat (limited to '')
-rw-r--r-- | changelog.d/15614.bugfix | 1 | ||||
-rw-r--r-- | synapse/config/appservice.py | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/changelog.d/15614.bugfix b/changelog.d/15614.bugfix new file mode 100644 index 0000000000..b523ae6eb1 --- /dev/null +++ b/changelog.d/15614.bugfix @@ -0,0 +1 @@ +Fix a bug introduced in Synapse 1.82.0 where the error message displayed when validation of the `app_service_config_files` config option fails would be incorrectly formatted. diff --git a/synapse/config/appservice.py b/synapse/config/appservice.py index fd89960e72..c2710fdf04 100644 --- a/synapse/config/appservice.py +++ b/synapse/config/appservice.py @@ -36,11 +36,10 @@ class AppServiceConfig(Config): if not isinstance(self.app_service_config_files, list) or not all( type(x) is str for x in self.app_service_config_files ): - # type-ignore: this function gets arbitrary json value; we do use this path. raise ConfigError( "Expected '%s' to be a list of AS config files:" % (self.app_service_config_files), - "app_service_config_files", + ("app_service_config_files",), ) self.track_appservice_user_ips = config.get("track_appservice_user_ips", False) |