[BACKEND] Include yaml exception in error
This commit is contained in:
parent
5f9b8afc4b
commit
6046d8f629
1 changed files with 2 additions and 2 deletions
|
|
@ -38,9 +38,9 @@ def load_yaml(file_path: str | Path) -> Dict:
|
|||
with open(file_path, "r", encoding="utf-8") as file:
|
||||
output = yaml.safe_load(file)
|
||||
except YAMLError as yaml_exception:
|
||||
logger.debug(yaml_exception)
|
||||
raise InvalidYamlException(
|
||||
f"'{file_path}' has invalid YAML, copy-paste it into a YAML checker to find the issue."
|
||||
f"'{file_path}' has invalid YAML:\n{yaml_exception}\n\n"
|
||||
f"Copy-pasting it into a YAML parser can also help find the issue."
|
||||
) from yaml_exception
|
||||
|
||||
if not isinstance(output, dict):
|
||||
|
|
|
|||
Loading…
Reference in a new issue