Skip to content

fix: make error hints match the error class - #107

Merged
yarolegovich merged 2 commits into
a2aproject:mainfrom
ConnorMoss02:fix/clierr-specific-messages
Nov 3, 2026
Merged

yarolegovich merged 2 commits into
a2aproject:mainfrom
ConnorMoss02:fix/clierr-specific-messages

Conversation

@ConnorMoss02

Copy link
Copy Markdown
Contributor

A local file error was still classified as IO. syscall.Errno inside a *fs.PathError satisfies net.Error, so a failed --save-fileparts write or a missing server --card file 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-param or --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

ConnorMoss02 and others added 2 commits October 30, 2026 12:19
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.
@yarolegovich

Copy link
Copy Markdown
Member

merging with a minor tweak of classification logic

@yarolegovich
yarolegovich merged commit f50a110 into a2aproject:main Nov 3, 2026
4 checks passed
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).
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.

bug: local file errors still exit 3 with a connectivity hint

2 participants