Enum Class A2AErrorCodes

java.lang.Object
java.lang.Enum<A2AErrorCodes>
org.a2aproject.sdk.spec.A2AErrorCodes
All Implemented Interfaces:
Serializable, Comparable<A2AErrorCodes>, Constable

public enum A2AErrorCodes extends Enum<A2AErrorCodes>
All the error codes for A2A errors.

Each constant provides:

See Also:
  • Enum Constant Details

    • TASK_NOT_FOUND

      public static final A2AErrorCodes TASK_NOT_FOUND
      Error code indicating the requested task was not found (-32001).
    • TASK_NOT_CANCELABLE

      public static final A2AErrorCodes TASK_NOT_CANCELABLE
      Error code indicating the task cannot be canceled in its current state (-32002).
    • PUSH_NOTIFICATION_NOT_SUPPORTED

      public static final A2AErrorCodes PUSH_NOTIFICATION_NOT_SUPPORTED
      Error code indicating push notifications are not supported by this agent (-32003).
    • UNSUPPORTED_OPERATION

      public static final A2AErrorCodes UNSUPPORTED_OPERATION
      Error code indicating the requested operation is not supported (-32004).
    • CONTENT_TYPE_NOT_SUPPORTED

      public static final A2AErrorCodes CONTENT_TYPE_NOT_SUPPORTED
      Error code indicating the content type is not supported (-32005).
    • INVALID_AGENT_RESPONSE

      public static final A2AErrorCodes INVALID_AGENT_RESPONSE
      Error code indicating the agent returned an invalid response (-32006).
    • EXTENDED_AGENT_CARD_NOT_CONFIGURED

      public static final A2AErrorCodes EXTENDED_AGENT_CARD_NOT_CONFIGURED
      Error code indicating extended agent card is not configured (-32007).
    • EXTENSION_SUPPORT_REQUIRED

      public static final A2AErrorCodes EXTENSION_SUPPORT_REQUIRED
      Error code indicating client requested use of an extension marked as required: true in the Agent Card but the client did not declare support for it in the request (-32008).
    • VERSION_NOT_SUPPORTED

      public static final A2AErrorCodes VERSION_NOT_SUPPORTED
      Error code indicating the A2A protocol version specified in the request (via A2A-Version service parameter) is not supported by the agent (-32009).
    • INVALID_REQUEST

      public static final A2AErrorCodes INVALID_REQUEST
      JSON-RPC error code for invalid request structure (-32600).
    • METHOD_NOT_FOUND

      public static final A2AErrorCodes METHOD_NOT_FOUND
      JSON-RPC error code for method not found (-32601).
    • INVALID_PARAMS

      public static final A2AErrorCodes INVALID_PARAMS
      JSON-RPC error code for invalid method parameters (-32602).
    • INTERNAL

      public static final A2AErrorCodes INTERNAL
      JSON-RPC error code for internal server errors (-32603).
    • JSON_PARSE

      public static final A2AErrorCodes JSON_PARSE
      JSON-RPC error code for JSON parsing errors (-32700).
  • Method Details

    • values

      public static A2AErrorCodes[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static A2AErrorCodes valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • code

      public int code()
      Returns the JSON-RPC error code.
      Returns:
      the numeric error code
    • grpcStatus

      public String grpcStatus()
      Returns the corresponding gRPC status name.
      Returns:
      the gRPC status string (e.g., "NOT_FOUND", "INTERNAL")
    • httpCode

      public int httpCode()
      Returns the HTTP status code.
      Returns:
      the HTTP status code
    • fromCode

      public static @Nullable A2AErrorCodes fromCode(int code)
      Looks up an error code enum constant by its JSON-RPC numeric code.
      Parameters:
      code - the JSON-RPC error code
      Returns:
      the matching enum constant, or null if not found