Package com.snowflake.ingest.streaming
Enum ErrorCode
- java.lang.Object
-
- java.lang.Enum<ErrorCode>
-
- com.snowflake.ingest.streaming.ErrorCode
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLOSED_CHANNEL_ERROR
CLOSED_CLIENT_ERROR
FATAL
INVALID_ARGUMENT
INVALID_CHANNEL_ERROR
SERIALIZATION_ERROR
TOKEN_CHECKER_ERROR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ErrorCode
fromString(java.lang.String errorCodeName)
Find an ErrorCode by its string namejava.lang.String
getErrorCodeName()
Get the error code name (e.g., "InvalidArgument")int
getHttpStatusCode()
Get the HTTP status code (e.g., 400)java.lang.String
getHttpStatusName()
Get the HTTP status name (e.g., "Bad Request")static ErrorCode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ErrorCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static ErrorCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ErrorCode c : ErrorCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ErrorCode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getErrorCodeName
public java.lang.String getErrorCodeName()
Get the error code name (e.g., "InvalidArgument")
-
getHttpStatusCode
public int getHttpStatusCode()
Get the HTTP status code (e.g., 400)
-
getHttpStatusName
public java.lang.String getHttpStatusName()
Get the HTTP status name (e.g., "Bad Request")
-
fromString
public static ErrorCode fromString(java.lang.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
-
-