Skip to content

Commit b4bb6f8

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 23f0890 commit b4bb6f8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/specify_cli/workflows/overlays/layer_sources.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def collect(self, workflow_id: str) -> list[Layer]:
9898
raise OverlayLoadError(path, ["Symlinked overlay files are not allowed"])
9999
try:
100100
data = yaml.safe_load(path.read_text(encoding="utf-8")) or {}
101-
except (yaml.YAMLError, OSError, UnicodeDecodeError) as exc:
101+
except yaml.YAMLError as exc:
102+
raise OverlayLoadError(path, [f"Invalid YAML: {exc}"]) from exc
103+
except (OSError, UnicodeDecodeError) as exc:
102104
raise OverlayLoadError(path, [f"Cannot load overlay: {exc}"]) from exc
103105
overlay, errors = validate_overlay_yaml(data)
104106
if overlay is None or errors:

0 commit comments

Comments
 (0)