Skip to content

Commit d90ad25

Browse files
fix: narrow exception in extension registration fallback from Exception to specific types
Bare 'except Exception' silently swallows all errors. Narrow to (TypeError, ValueError, KeyError) which are the realistic failure modes in extension registration.
1 parent 5e2f9bc commit d90ad25

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/specify_cli/presets/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ def record_written(written: Dict[str, List[str]]) -> None:
17271727
)
17281728
record_written(written)
17291729
registered = True
1730-
except Exception:
1730+
except (TypeError, ValueError, KeyError):
17311731
# Extension registration failed; fall back to
17321732
# generic path-based registration below.
17331733
pass

0 commit comments

Comments
 (0)