Proper exit codes and error propagation #165
Labels
No labels
Agent/Chrome-Android
Agent/Chrome-Desktop
Agent/Chrome-iOS
Agent/Firefox-Android
Agent/Firefox-Desktop
Agent/Firefox-iOS
Agent/Safari-Desktop
Agent/Safari-iOS
Code/Backend
Code/DB
Code/DevOps
Code/Frontend
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
overdrives/chambersbr#165
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Currently, when any sync fails, the code logs the error and returns from main, so the process exits 0. Cron, systemd, and CI can't tell that a sync failed. This also applies to the setup failures that only fmt.Printf.
Commands return error; main logs it and exits 1.
Wrap errors with context (fmt.Errorf("sync polls year=%d: %w", year, err)) so the year/legislature details currently passed as slog attributes aren't lost.
Log the final error to both stderr and the sync log file.
Acceptance criteria: