snowflake::ingest::streaming::StreamingIngestError Class Referencefinal
Structured error type returned by all SDK operations via Result<T>.
More...
#include <snowflake/ingest/streaming/error.h>
Public Member Functions | |
| StreamingIngestError (ErrorCode code,std::string message,int http_status_code,std::string http_status_name) | |
| Construct an error from its fields. | |
| ErrorCode | code () const noexcept |
| SDK error code. | |
| const std:: | message () const noexcept |
| Detail message. | |
| int | http_status_code () const noexcept |
| HTTP status associated with this error. | |
| const std:: | http_status_name () const noexcept |
| HTTP reason phrase (e.g. "Bad Request"). | |
| std:: | ToString () const |
Returns a human-readable description of the error, formatted as {errorCode}: {detail} (HTTP {code} {name}). | |
Static Public Member Functions | |
| static StreamingIngestError | FromRustJson (std::string_view json_error) |
| Parse the JSON error payload produced by the Rust core. | |
Detailed Description
Structured error type returned by all SDK operations via Result<T>.
Carries the full error information serialized by the Rust core:
{ "error_code": "...", "message": "...",
"http_status_code": N, "http_status_name": "..." }
Constructor & Destructor Documentation
StreamingIngestError¶
StreamingIngestError::StreamingIngestError(
ErrorCode code,
std::string message,
int http_status_code,
std::string http_status_name ))
ErrorCode code,
std::string message,
int http_status_code,
std::string http_status_name ))
Construct an error from its fields.
- Parameters
-
code SDK error code. message Detail message. http_status_code HTTP status associated with this error. http_status_name HTTP reason phrase (e.g. "Bad Request").
Member Function Documentation
code¶
|
ErrorCode StreamingIngestError::code() const
|
inlinenoexcept |
SDK error code.
- Returns
- the SDK error code
FromRustJson¶
| static |
Parse the JSON error payload produced by the Rust core.
- Parameters
-
json_error the JSON error payload
- Returns
- the parsed error, or a
kFatalerror on parse failure
http_status_code¶
|
int StreamingIngestError::http_status_code() const
|
inlinenoexcept |
HTTP status associated with this error.
- Returns
- the HTTP status code
http_status_name¶
|
const std::string & StreamingIngestError::http_status_name() const
|
inlinenoexcept |
HTTP reason phrase (e.g. "Bad Request").
- Returns
- the HTTP reason phrase
message¶
|
const std::string & StreamingIngestError::message() const
|
inlinenoexcept |
Detail message.
- Returns
- the detail message
ToString¶
std::string StreamingIngestError::ToString() const
Returns a human-readable description of the error, formatted as {errorCode}: {detail} (HTTP {code} {name}).
- Returns
- the description of this error