Summary
inference-gateway/adk now returns typed errors from client.Client (inference-gateway/adk#400, closes inference-gateway/adk#398): *types.JSONRPCError implements error and unwraps to a sentinel per spec code (types.ErrMethodNotFound, types.ErrTaskNotFound, ...), and the unexpected-status sites return *types.HTTPStatusError{Operation, StatusCode, Body}. The message text is unchanged, so nothing breaks today - but the three text parsers in internal/protocols/a2a/infrastructure/auth.go can be replaced with errors.As / errors.Is once the CLI bumps its ADK dependency.
The parsers to retire: the unexpected status code ... 401|403 regex, the guardrail refusal envelope regex, and the (code: -32601) substring match added in #1545.
Acceptance Criteria
Summary
inference-gateway/adknow returns typed errors fromclient.Client(inference-gateway/adk#400, closes inference-gateway/adk#398):*types.JSONRPCErrorimplementserrorand unwraps to a sentinel per spec code (types.ErrMethodNotFound,types.ErrTaskNotFound, ...), and the unexpected-status sites return*types.HTTPStatusError{Operation, StatusCode, Body}. The message text is unchanged, so nothing breaks today - but the three text parsers ininternal/protocols/a2a/infrastructure/auth.gocan be replaced witherrors.As/errors.Isonce the CLI bumps its ADK dependency.The parsers to retire: the
unexpected status code ... 401|403regex, the guardrail refusal envelope regex, and the(code: -32601)substring match added in #1545.Acceptance Criteria
github.com/inference-gateway/adkdependency to the release containing the typed errorserrors.As(err, &statusErr)and a check onstatusErr.StatusCode(code: -32601)substring match witherrors.Is(err, types.ErrMethodNotFound)Datafield and drop the regex if it is covered