Enum Class A2AErrorTypes

java.lang.Object
java.lang.Enum<A2AErrorTypes>
com.mulesoft.connectors.a2a.internal.error.A2AErrorTypes
All Implemented Interfaces:
Serializable, Comparable<A2AErrorTypes>, Constable, org.mule.runtime.extension.api.error.ErrorTypeDefinition<A2AErrorTypes>

public enum A2AErrorTypes extends Enum<A2AErrorTypes> implements org.mule.runtime.extension.api.error.ErrorTypeDefinition<A2AErrorTypes>
Represents an error that can happen in an A2A operation.
Since:
1.0
  • Enum Constant Details

    • JSON_RPC_ERROR

      public static final A2AErrorTypes JSON_RPC_ERROR
      Parent type for errors that match those defined in the Json RPC standard
    • PARSE_ERROR

      public static final A2AErrorTypes PARSE_ERROR
      Occurs when a JSON object could not be parsed and/or is malformed
    • INVALID_REQUEST

      public static final A2AErrorTypes INVALID_REQUEST
      The request was invalid or malformed
    • METHOD_NOT_FOUND

      public static final A2AErrorTypes METHOD_NOT_FOUND
      The remote MCP server does not support the given method, most likely due to a version incompatibility or a bug
    • INVALID_PARAMS

      public static final A2AErrorTypes INVALID_PARAMS
      Supplied parameters were invalid
    • INTERNAL_ERROR

      public static final A2AErrorTypes INTERNAL_ERROR
      Internal error either on the remove server or this connector
    • SERVER_ERROR

      public static final A2AErrorTypes SERVER_ERROR
    • TASK_NOT_FOUND

      public static final A2AErrorTypes TASK_NOT_FOUND
      Requested task is not found or doesn't exist
    • TASK_ALREADY_COMPLETED

      public static final A2AErrorTypes TASK_ALREADY_COMPLETED
      Requested task already completed cannot be cancelled
    • PUSH_NOTIFICATION_UNSUPPORTED

      public static final A2AErrorTypes PUSH_NOTIFICATION_UNSUPPORTED
      Requested task already completed cannot be cancelled
    • REQUEST_TIMEOUT

      public static final A2AErrorTypes REQUEST_TIMEOUT
      The request timed out. In the case of asynchronous transports like SSE, this also includes the time until a response is obtained.
    • UNAUTHORIZED

      public static final A2AErrorTypes UNAUTHORIZED
      Client not Authorized
    • INVALID_AGENT_CARD

      public static final A2AErrorTypes INVALID_AGENT_CARD
      Invalid agent card
  • Method Details

    • values

      public static A2AErrorTypes[] 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 A2AErrorTypes 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
    • fromRpcErrorCode

      public static A2AErrorTypes fromRpcErrorCode(Integer errorCode)
      Parameters:
      errorCode - a JSON RPC error code
      Returns:
      the error type that most closely matches it
    • getJsonRpcCode

      public Optional<Integer> getJsonRpcCode()
    • getHttpStatusCode

      public int getHttpStatusCode()
    • getParent

      public Optional<org.mule.runtime.extension.api.error.ErrorTypeDefinition<? extends Enum<?>>> getParent()
      Specified by:
      getParent in interface org.mule.runtime.extension.api.error.ErrorTypeDefinition<A2AErrorTypes>
    • isJsonRpcError

      public boolean isJsonRpcError()