Package com.snowflake.ingest.streaming
Enum Class ErrorCode
- All Implemented Interfaces:
Serializable,Comparable<ErrorCode>,Constable
Strongly-typed error codes for Java-side errors with compile-time safety. Each error code has an
associated HTTP status from the HttpStatus enum.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorCodefromString(String errorCodeName) Find an ErrorCode by its string nameGet the error code name (e.g., "InvalidArgument")intGet the HTTP status code (e.g., 400)Get the HTTP status name (e.g., "Bad Request")static ErrorCodeReturns the enum constant of this class with the specified name.static ErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INVALID_ARGUMENT
-
CLOSED_CHANNEL_ERROR
-
CLOSED_CLIENT_ERROR
-
INVALID_CHANNEL_ERROR
-
SERIALIZATION_ERROR
-
TOKEN_CHECKER_ERROR
-
FATAL
-
-
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
-
getErrorCodeName
Get the error code name (e.g., "InvalidArgument") -
getHttpStatusCode
public int getHttpStatusCode()Get the HTTP status code (e.g., 400) -
getHttpStatusName
Get the HTTP status name (e.g., "Bad Request") -
fromString
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
-