diff --git a/client/configuration/configuration.py b/client/configuration/configuration.py index fa6898014cf..32bcee71f02 100644 --- a/client/configuration/configuration.py +++ b/client/configuration/configuration.py @@ -499,8 +499,10 @@ def create_search_paths( LOG.warning(f"Unrecognized configuration item: {unrecognized_key}") return partial_configuration - except json.JSONDecodeError as error: - raise exceptions.InvalidConfiguration("Invalid JSON file") from error + except (json.JSONDecodeError, tomli.TOMLDecodeError) as error: + raise exceptions.InvalidConfiguration( + f'Invalid {"TOML" if is_pyproject_dot_toml else "JSON"} file' + ) from error @staticmethod def from_file(