Enum Class McpErrorTypes

java.lang.Object
java.lang.Enum<McpErrorTypes>
com.mulesoft.connectors.mcp.internal.error.McpErrorTypes
All Implemented Interfaces:
Serializable, Comparable<McpErrorTypes>, Constable, org.mule.sdk.api.error.ErrorTypeDefinition<McpErrorTypes>

public enum McpErrorTypes extends Enum<McpErrorTypes> implements org.mule.sdk.api.error.ErrorTypeDefinition<McpErrorTypes>
Represents an error that can happen in an HTTP operation.
Since:
1.0
  • Enum Constant Details

    • JSON_RPC_ERROR

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

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

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

      public static final McpErrorTypes 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 McpErrorTypes INVALID_PARAMS
      Supplied parameters were invalid
    • INTERNAL_ERROR

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

      public static final McpErrorTypes SERVER_ERROR
      Unspecified error on the MCP server side.
    • REQUEST_TIMEOUT

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

      public static final McpErrorTypes INVALID_URI
      The supplied URI could not be parsed.
  • Method Details

    • values

      public static McpErrorTypes[] 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 McpErrorTypes 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 McpErrorTypes fromRpcErrorCode(int errorCode)
      Parameters:
      errorCode - a JSON RPC error code
      Returns:
      the error type that most closely matches it
    • getParent

      public Optional<org.mule.sdk.api.error.ErrorTypeDefinition<? extends Enum<?>>> getParent()
      Specified by:
      getParent in interface org.mule.sdk.api.error.ErrorTypeDefinition<McpErrorTypes>
    • getCode

      public Optional<Integer> getCode()
    • isJsonRpcError

      public boolean isJsonRpcError()