Enum Class ErrorCode

java.lang.Object
java.lang.Enum<ErrorCode>
org.axonframework.axonserver.connector.ErrorCode
All Implemented Interfaces:
Serializable, Comparable<ErrorCode>, Constable

public enum ErrorCode extends Enum<ErrorCode>
Converts an Axon Server Error to the relevant Axon framework exception.
Since:
4.0
Author:
Marc Gathier
  • Enum Constant Details

    • AUTHENTICATION_TOKEN_MISSING

      public static final ErrorCode AUTHENTICATION_TOKEN_MISSING
    • AUTHENTICATION_INVALID_TOKEN

      public static final ErrorCode AUTHENTICATION_INVALID_TOKEN
    • UNSUPPORTED_INSTRUCTION

      public static final ErrorCode UNSUPPORTED_INSTRUCTION
    • INSTRUCTION_ACK_ERROR

      public static final ErrorCode INSTRUCTION_ACK_ERROR
    • INSTRUCTION_EXECUTION_ERROR

      public static final ErrorCode INSTRUCTION_EXECUTION_ERROR
    • INVALID_EVENT_SEQUENCE

      public static final ErrorCode INVALID_EVENT_SEQUENCE
    • NO_EVENT_STORE_MASTER_AVAILABLE

      public static final ErrorCode NO_EVENT_STORE_MASTER_AVAILABLE
    • EVENT_PAYLOAD_TOO_LARGE

      public static final ErrorCode EVENT_PAYLOAD_TOO_LARGE
    • CONNECTION_FAILED

      public static final ErrorCode CONNECTION_FAILED
    • GRPC_MESSAGE_TOO_LARGE

      public static final ErrorCode GRPC_MESSAGE_TOO_LARGE
    • NO_HANDLER_FOR_COMMAND

      public static final ErrorCode NO_HANDLER_FOR_COMMAND
    • COMMAND_EXECUTION_ERROR

      public static final ErrorCode COMMAND_EXECUTION_ERROR
    • COMMAND_DISPATCH_ERROR

      public static final ErrorCode COMMAND_DISPATCH_ERROR
    • CONCURRENCY_EXCEPTION

      public static final ErrorCode CONCURRENCY_EXCEPTION
    • COMMAND_EXECUTION_NON_TRANSIENT_ERROR

      public static final ErrorCode COMMAND_EXECUTION_NON_TRANSIENT_ERROR
    • NO_HANDLER_FOR_QUERY

      public static final ErrorCode NO_HANDLER_FOR_QUERY
    • QUERY_EXECUTION_ERROR

      public static final ErrorCode QUERY_EXECUTION_ERROR
    • QUERY_DISPATCH_ERROR

      public static final ErrorCode QUERY_DISPATCH_ERROR
    • QUERY_EXECUTION_NON_TRANSIENT_ERROR

      public static final ErrorCode QUERY_EXECUTION_NON_TRANSIENT_ERROR
    • DATAFILE_READ_ERROR

      public static final ErrorCode DATAFILE_READ_ERROR
    • INDEX_READ_ERROR

      public static final ErrorCode INDEX_READ_ERROR
    • DATAFILE_WRITE_ERROR

      public static final ErrorCode DATAFILE_WRITE_ERROR
    • INDEX_WRITE_ERROR

      public static final ErrorCode INDEX_WRITE_ERROR
    • DIRECTORY_CREATION_FAILED

      public static final ErrorCode DIRECTORY_CREATION_FAILED
    • VALIDATION_FAILED

      public static final ErrorCode VALIDATION_FAILED
    • TRANSACTION_ROLLED_BACK

      public static final ErrorCode TRANSACTION_ROLLED_BACK
    • OTHER

      public static final ErrorCode OTHER
  • Method Details

    • values

      public static ErrorCode[] 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 ErrorCode 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
    • getFromCode

      public static ErrorCode getFromCode(String code)
    • errorCode

      public String errorCode()
    • convert

      public AxonException convert(io.axoniq.axonserver.grpc.ErrorMessage errorMessage, Supplier<Object> details)
      Converts the errorMessage to the relevant AxonException
      Parameters:
      errorMessage - the descriptor of the error
      details - a supplier of (optional) application-specific details to be included in Exception, when appropriate
      Returns:
      the Axon Framework exception
    • convert

      public AxonException convert(io.axoniq.axonserver.grpc.ErrorMessage errorMessage)
      Converts the errorMessage to the relevant AxonException
      Parameters:
      errorMessage - the descriptor of the error
      Returns:
      the Axon Framework exception
    • convert

      public AxonException convert(Throwable throwable)
      Converts the throwable to the relevant AxonException
      Parameters:
      throwable - the descriptor of the error
      Returns:
      the Axon Framework exception
    • convert

      public AxonException convert(String source, Throwable throwable)
      Converts the source and the throwable to the relevant AxonException
      Parameters:
      source - The location that originally reported the error
      throwable - the descriptor of the error
      Returns:
      the Axon Framework exception
    • getQueryExecutionErrorCode

      public static ErrorCode getQueryExecutionErrorCode(Throwable throwable)
      Returns a Query Execution ErrorCode variation based on the transiency of the given Throwable
      Parameters:
      throwable - The Throwable to inspect for transiency
      Returns:
      ErrorCode variation
    • getCommandExecutionErrorCode

      public static ErrorCode getCommandExecutionErrorCode(Throwable throwable)
      Returns an Command Execution ErrorCode variation based on the transiency of the given Throwable
      Parameters:
      throwable - The Throwable to inspect for transiency
      Returns:
      ErrorCode variation