Enum Class ErrorCode

java.lang.Object
java.lang.Enum<ErrorCode>
com.snowflake.ingest.streaming.ErrorCode
All Implemented Interfaces:
Serializable, Comparable<ErrorCode>, Constable

public enum ErrorCode extends Enum<ErrorCode>
Strongly-typed error codes for Java-side errors with compile-time safety. Each error code has an associated HTTP status from the HttpStatus enum.
  • Enum Constant Details

    • INVALID_ARGUMENT

      public static final ErrorCode INVALID_ARGUMENT
    • CLOSED_CHANNEL_ERROR

      public static final ErrorCode CLOSED_CHANNEL_ERROR
    • CLOSED_CLIENT_ERROR

      public static final ErrorCode CLOSED_CLIENT_ERROR
    • INVALID_CHANNEL_ERROR

      public static final ErrorCode INVALID_CHANNEL_ERROR
    • SERIALIZATION_ERROR

      public static final ErrorCode SERIALIZATION_ERROR
    • TOKEN_CHECKER_ERROR

      public static final ErrorCode TOKEN_CHECKER_ERROR
    • FATAL

      public static final ErrorCode FATAL
  • 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
    • getErrorCodeName

      public String getErrorCodeName()
      Get the error code name (e.g., "InvalidArgument")
    • getHttpStatusCode

      public int getHttpStatusCode()
      Get the HTTP status code (e.g., 400)
    • getHttpStatusName

      public String getHttpStatusName()
      Get the HTTP status name (e.g., "Bad Request")
    • fromString

      public static ErrorCode fromString(String errorCodeName)
      Find an ErrorCode by its string name
      Parameters:
      errorCodeName - the error code name to look up
      Returns:
      the matching ErrorCode, or null if not found