snowflake.ingest.streaming.StreamingIngestErrorCode

class StreamingIngestErrorCode(*args, **kwds)

Bases: enum.Enum

Enumeration of all possible streaming ingest error codes.

These error codes correspond to the IngestError variants in the Rust implementation and provide type-safe error handling.

CONFIG_ERROR = 'ConfigError'
INVALID_REQUEST = 'InvalidRequest'
INVALID_ARGUMENT = 'InvalidArgument'
SF_API_USER_ERROR = 'SfApiUserError'
NOT_IMPLEMENTED = 'NotImplemented'
HTTP_CLIENT_NON_RETRYABLE_ERROR = 'HttpClientNonRetryableError'
SF_API_PIPE_FAILED_OVER_ERROR = 'SfApiPipeFailedOverError'
CHANNEL_ALREADY_EXISTS = 'ChannelAlreadyExists'
AUTH_TOKEN_ERROR = 'AuthTokenError'
SF_API_AUTH_ERROR = 'SfApiAuthError'
CHANNEL_NOT_FOUND = 'ChannelNotFound'
CHANNEL_WAIT_FOR_FLUSH_TIMEOUT = 'ChannelWaitForFlushTimeout'
CLIENT_WAIT_FOR_FLUSH_TIMEOUT = 'ClientWaitForFlushTimeout'
CLOSED_CHANNEL_ERROR = 'ClosedChannelError'
CLOSED_CLIENT_ERROR = 'ClosedClientError'
CHANNEL_CLOSED_BY_USER = 'ChannelClosedByUser'
INVALID_CHANNEL_ERROR = 'InvalidChannelError'
INVALID_CLIENT_ERROR = 'InvalidClientError'
INPUT_CHANNEL_CLOSED = 'InputChannelClosed'
OUTPUT_CHANNEL_CLOSED = 'OutputChannelClosed'
RECEIVER_SATURATED = 'ReceiverSaturated'
MEMORY_THRESHOLD_EXCEEDED = 'MemoryThresholdExceeded'
MEMORY_THRESHOLD_EXCEEDED_IN_CONTAINER = 'MemoryThresholdExceededInContainer'
FATAL = 'Fatal'
NON_FATAL = 'NonFatal'
MUTEX_LOCK_FAILED = 'MutexLockFailed'
SF_API_UNEXPECTED_BEHAVIOR_ERROR = 'SfApiUnexpectedBehaviorError'
SF_API_INTERNAL_SERVER_ERROR = 'SfApiInternalServerError'
FILE_UPLOAD_ERROR = 'FileUploadError'
HTTP_RETRIES_EXHAUSTED_ERROR = 'HttpRetriesExhaustedError'
CLOSE_ALL_CHANNELS_FAILED_ERROR = 'CloseAllChannelsFailedError'
HTTP_RETRYABLE_CLIENT_ERROR = 'HttpRetryableClientError'
classmethod from_string(error_code_str: str) StreamingIngestErrorCode | None

Convert a string error code to enum value if it exists.

Parameters:

error_code_str – The error code string to convert

Raises:

ValueError – If the error code string is invalid

Returns:

The matching StreamingIngestErrorCode enum value, or None if not found

exception StreamingIngestError(error_code: StreamingIngestErrorCode, message: str, http_status_code: int, http_status_name: str)

Bases: Exception

A class for all streaming ingest errors.

property error_code: StreamingIngestErrorCode

The error code of the error.

property message: str

The message of the error.

property http_status_code: int

The HTTP status code of the error.

property http_status_name: str

The HTTP status name of the error.