Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Throw if the appservice config list is the wrong type #15425

Merged
merged 5 commits into from
Apr 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
raise a ConfigError on an invalid app_service_config_files
  • Loading branch information
Half-Shot committed Apr 12, 2023
commit 9e769b0206ff038222a5400d63a05f40c62cbd9d
7 changes: 5 additions & 2 deletions synapse/config/appservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ def load_appservices(
"""Returns a list of Application Services from the config files."""
if not isinstance(config_files, list):
# type-ignore: this function gets arbitrary json value; we do use this path.
logger.warning("Expected %s to be a list of AS config files.", config_files) # type: ignore[unreachable]
return []
raise ConfigError(
"Expected '%s' to be a list of AS config files:"
% (config_files)
"app_service_config_files"
)

# Dicts of value -> filename
seen_as_tokens: Dict[str, str] = {}
Expand Down