Skip to content

refactor: standardize error handling with sentinel errors - #119

Merged
halspang merged 1 commit into
mainfrom
modernize/error-handling
Mar 13, 2026
Merged

halspang merged 1 commit into
mainfrom
modernize/error-handling

Conversation

@halspang

Copy link
Copy Markdown
Member
  • Add ErrOperationAborted, ErrNilHistoryEvent, ErrNilEventTimestamp, ErrNotExecutionStarted sentinel errors to backend package
  • Replace bare errors.New() calls with sentinel errors in sqlite and postgres backends for consistent error checking via errors.Is()
  • Replace bare errors.New("unimplemented") in gRPC executor with proper status.Error(codes.Unimplemented, ...) for gRPC compliance
  • Fix typo: "multi-instance purge is not unimplemented" ->
    "multi-instance purge is not yet implemented"

- Add ErrOperationAborted, ErrNilHistoryEvent, ErrNilEventTimestamp,
  ErrNotExecutionStarted sentinel errors to backend package
- Replace bare errors.New() calls with sentinel errors in sqlite and
  postgres backends for consistent error checking via errors.Is()
- Replace bare errors.New("unimplemented") in gRPC executor with
  proper status.Error(codes.Unimplemented, ...) for gRPC compliance
- Fix typo: "multi-instance purge is not unimplemented" ->
  "multi-instance purge is not yet implemented"

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@halspang
halspang merged commit 908795b into main Mar 13, 2026
6 checks passed
@NickCraver
Nick Craver (NickCraver) deleted the modernize/error-handling branch June 8, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants