Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

quality: Display the Pydantic parsing error for configuration

Clémence Lesnéfd8caa1595c4
diff --git a/helpers/config.py b/helpers/config.py
index c66b529..e8af614 100644
--- a/helpers/config.py
+++ b/helpers/config.py
@@ -38,7 +38,7 @@ def load_config() -> RootModel:
print(f'Config loaded from file "{path}"') # noqa: T201
return config
except ValidationError as e:
- raise ConfigBadFormat("Config values are not valid") from e
+ raise ConfigBadFormat(f"Config values are not valid: {e.errors()}") from e
except Exception as e:
raise ConfigBadFormat("Config YAML format is not valid") from e