Improve API error UX and exit codes #142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/134-error-ux-exit-codes"
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?
What
Adds friendly central HTTP error headlines for 403/404/429 and stable exit-code classification for API failure classes.
Why
Scripts need reliable failure classes, and users should not see raw
/api/v1paths as the leading error message.Fixes rasterstate/fj#134
How
ensure_successwhile preserving the rawApiErrorcause for--debug.ApiErrorstatuses inrun_clito documented stable exit codes.docs/exit-codes.md.Test plan
cargo fmt --checkcargo clippy --all-targets --all-features -- -D warningscargo test --allcargo audit --ignore RUSTSEC-2024-0370 -D warnings(not in issue gate)Surface changes
/api/v1paths.Merge: squash only.
/api/v1URL and every failure exits 1, so scripts cannot branch on failure kind #123