Skip to content

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

Open
ConnorMoss02 wants to merge 1 commit into
a2aproject:mainfrom
ConnorMoss02:fix/clierr-specific-messages
Open

ConnorMoss02 wants to merge 1 commit 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

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.
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

1 participant