Skip to content

[TASK] Refactor A2A error parsing onto the ADK typed errors #1547

Description

@inference-gateway-maintainer

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

  • Bump the github.com/inference-gateway/adk dependency to the release containing the typed errors
  • Replace the status-code regex with errors.As(err, &statusErr) and a check on statusErr.StatusCode
  • Replace the (code: -32601) substring match with errors.Is(err, types.ErrMethodNotFound)
  • Re-check the guardrail envelope parser against the typed error's Data field and drop the regex if it is covered

Activity

  1. inference-gateway-releaser commented on Oct 6, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.226.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions