A2aEngine.Errors (a2a_engine v0.1.0)

Copy Markdown View Source

A2A-specific JSON-RPC 2.0 error codes.

Standard JSON-RPC codes are in the -327xx range (parse, invalid request, method not found, invalid params, internal). A2A-specific codes occupy -32001 through -32007.

Every error is wire-shaped as:

%{"code" => integer, "message" => string, "data" => optional map}

Summary

Functions

Every error code defined by the spec (standard + A2A).

Build an error map with the default message for the given code.

Build an error map with a custom message and optional data payload.

The canonical default message for an error code.

Types

code()

@type code() :: integer()

error()

@type error() :: %{code: code(), message: String.t(), data: map() | nil}

Functions

all_codes()

@spec all_codes() :: [code()]

Every error code defined by the spec (standard + A2A).

authenticated_extended_card_not_configured()

build(code)

@spec build(code()) :: %{code: code(), message: String.t()}

Build an error map with the default message for the given code.

build(code, message, data \\ nil)

@spec build(code(), String.t(), map() | nil) :: map()

Build an error map with a custom message and optional data payload.

content_type_not_supported()

default_message(code)

@spec default_message(code()) :: String.t() | nil

The canonical default message for an error code.

internal_error()

invalid_agent_response()

invalid_params()

invalid_request()

method_not_found()

parse_error()

push_notification_not_supported()

task_not_cancelable()

task_not_found()

unsupported_operation()