[inconsistency] Consolidate error handling: anyhow vs NotfilesError across crates #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Audit finding (medium): Error handling is split across crates:
notfiles/notcore: useResult<T, NotfilesError>withthiserrornothooks,notsecrets,notstrap: useanyhow::ResultWorse,
nothooks/src/runner.rssuppresses state load errors with.unwrap_or_default()whilenotfilespropagates them — hook state corruption is silently swallowed.Options:
NotfilesErrorvariants to cover hook/secret/bootstrap errors and migrate all cratesNotfilesErrorfor notcore/notfiles only — document this explicitlyEither way, the silent
.unwrap_or_default()in hook state loading should be replaced with a logged warning at minimum.