Skip to content

Commit be2ccb2

Browse files
mnriemCopilot
andcommitted
Chain exceptions in _load_catalog_config for both catalog classes
Add 'from exc' to preserve root cause in tracebacks while keeping clean user-facing messages. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7d34612 commit be2ccb2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/specify_cli/workflows/catalog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def _load_catalog_config(
182182
except (yaml.YAMLError, OSError, UnicodeError) as exc:
183183
raise WorkflowValidationError(
184184
f"Failed to read catalog config {config_path}: {exc}"
185-
)
185+
) from exc
186186
if not isinstance(data, dict):
187187
raise WorkflowValidationError(
188188
f"Invalid catalog config: expected a mapping, "
@@ -797,7 +797,7 @@ def _load_catalog_config(
797797
except (yaml.YAMLError, OSError, UnicodeError) as exc:
798798
raise StepValidationError(
799799
f"Failed to read catalog config {config_path}: {exc}"
800-
)
800+
) from exc
801801
if not isinstance(data, dict):
802802
raise StepValidationError(
803803
f"Invalid catalog config: expected a mapping, "

0 commit comments

Comments
 (0)