Repository navigation
fix: make error hints match the error class - #107
Merged
yarolegovich merged 2 commits intoNov 3, 2026
Merged
Conversation
A local file error was classified as IO because the syscall.Errno inside a *fs.PathError satisfies net.Error. Failing to write --save-fileparts or read `server --card` exited 3 with a connectivity hint. It now exits 1. A card request that got 401/403 or 5xx said to check the --agent-card reference. It now asks for credentials or points at the agent.
Excluding only fs.PathError still classified os.LinkError and os.SyscallError wrapping an errno as io. Also reword the 401/403 card hint so it fits users who already passed credentials.
Member
|
merging with a minor tweak of classification logic |
yarolegovich
approved these changes
Nov 3, 2026
yarolegovich
pushed a commit
that referenced
this pull request
Nov 4, 2026
🤖 I have created a release *beep* *boop* --- ## [0.4.0](v0.3.1...v0.4.0) (2026-11-04) ### Features * add --ca-cert to trust a custom CA ([#119](#119)) ([b8309d0](b8309d0)) * add --unix-socket and credential helpers ([#105](#105)) ([0f6200c](0f6200c)) * add an interactive chat command ([#86](#86)) ([c65d313](c65d313)) * add install script for macOS and Linux ([#120](#120)) ([0234a8f](0234a8f)) ### Bug Fixes * honor --timeout on card resolution and document wait/polling flags ([#94](#94)) ([4c17dd2](4c17dd2)) * make error hints match the error class ([#107](#107)) ([f50a110](f50a110)) * print flag and argument errors as JSON under -o json ([#117](#117)) ([b90755a](b90755a)), closes [#115](#115) * report a missing --file-part or --config file as a usage error ([#97](#97)) ([7229469](7229469)), closes [#96](#96) * report bad task list filters and missing push-config flags as usage errors ([#118](#118)) ([a1809cb](a1809cb)), closes [#116](#116) * report invalid --data-part JSON as a usage error ([#110](#110)) ([c26bb76](c26bb76)), closes [#109](#109) * send gRPC through --unix-socket ([#122](#122)) ([c44eb01](c44eb01)), closes [#108](#108) * use TLS by default for built-in gRPC connections ([#114](#114)) ([7510bd5](7510bd5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A local file error was still classified as IO.
syscall.Errnoinside a*fs.PathErrorsatisfiesnet.Error, so a failed--save-filepartswrite or a missingserver --cardfile exited 3 with a connectivity hint. It now exits 1 with no hint.A card request that got 401/403 now hints to pass
--auth,--svc-paramor--credential-helper. A 5xx points at the agent. Other card failures keep the reference hint.Follow-up to yarolegovich's comment on #97.
Fixes #106