Enum Class 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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionInternal error either on the remove server or this connectorSupplied parameters were invalidThe request was invalid or malformedThe supplied URI could not be parsed.Parent type for errors that match those defined in the Json RPC standardThe remote MCP server does not support the given method, most likely due to a version incompatibility or a bugOccurs when a JSON object could not be parsed and/or is malformedThe request timed out.Unspecified error on the MCP server side. -
Method Summary
Modifier and TypeMethodDescriptionstatic McpErrorTypesfromRpcErrorCode(int errorCode) getCode()booleanstatic McpErrorTypesReturns the enum constant of this class with the specified name.static McpErrorTypes[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface org.mule.sdk.api.error.ErrorTypeDefinition
getType
-
Enum Constant Details
-
JSON_RPC_ERROR
Parent type for errors that match those defined in the Json RPC standard -
PARSE_ERROR
Occurs when a JSON object could not be parsed and/or is malformed -
INVALID_REQUEST
The request was invalid or malformed -
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
Supplied parameters were invalid -
INTERNAL_ERROR
Internal error either on the remove server or this connector -
SERVER_ERROR
Unspecified error on the MCP server side. -
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
The supplied URI could not be parsed.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
fromRpcErrorCode
- Parameters:
errorCode- a JSON RPC error code- Returns:
- the error type that most closely matches it
-
getParent
- Specified by:
getParentin interfaceorg.mule.sdk.api.error.ErrorTypeDefinition<McpErrorTypes>
-
getCode
-
isJsonRpcError
public boolean isJsonRpcError()
-