pub enum Error {
Common {
source: Error,
},
Delta(DeltaErrorModel),
ClientError {
source: Error,
},
MalformedResponse {
source: Error,
},
MalformedUrl {
source: ParseError,
},
RequestError(Error),
Api(UcApiError),
Generic(String),
}Variants§
Common
Delta(DeltaErrorModel)
ClientError
MalformedResponse
MalformedUrl
Fields
source: ParseErrorRequestError(Error)
Api(UcApiError)
Generic(String)
Implementations§
Source§impl Error
impl Error
pub fn is_not_found(&self) -> bool
pub fn is_already_exists(&self) -> bool
pub fn is_permission_denied(&self) -> bool
pub fn is_unauthenticated(&self) -> bool
Sourcepub fn is_commit_conflict(&self) -> bool
pub fn is_commit_conflict(&self) -> bool
Whether this is a Delta CommitVersionConflictException (409): a
concurrent commit ratified the proposed version first. The caller should
rebuild its snapshot and retry the commit.
Sourcepub fn is_update_requirement_conflict(&self) -> bool
pub fn is_update_requirement_conflict(&self) -> bool
Whether this is a Delta UpdateRequirementConflictException (409): an
assert-etag/assert-table-uuid requirement was not met. The caller
should reload the table and retry.
Sourcepub fn is_resource_exhausted(&self) -> bool
pub fn is_resource_exhausted(&self) -> bool
Whether this is a Delta ResourceExhaustedException / TooManyRequestsException
(429): the request was throttled or hit the unbackfilled-commit limit. The
caller should back off (and backfill pending commits) before retrying.
Sourcepub fn is_commit_state_unknown(&self) -> bool
pub fn is_commit_state_unknown(&self) -> bool
Whether this is a Delta CommitStateUnknownException (500): the commit
outcome is unknown. The caller must check table state before retrying to
avoid duplicate commits.
Sourcepub fn is_unsupported_table_format(&self) -> bool
pub fn is_unsupported_table_format(&self) -> bool
Whether this is a Delta UnsupportedTableFormatException (400): the table
is not Delta, or is a Delta table this /delta/v1 endpoint does not
support. The caller should fall back to the legacy UC table API.
Sourcepub fn is_not_implemented(&self) -> bool
pub fn is_not_implemented(&self) -> bool
Whether this is a Delta NotImplementedException (501): the server does
not implement this /delta/v1 functionality. The caller should fall back
to the legacy UC table API.
Sourcepub fn is_route_missing(&self) -> bool
pub fn is_route_missing(&self) -> bool
Whether this is a 404 that is not a recognizable Delta error envelope
— i.e. the /delta/v1 route itself is absent (no UnsupportedTableFormat
/ NoSuchTable envelope was returned), as on a UC deployment that does not
serve /delta/v1 at all.
This is deliberately distinct from Error::is_not_found: an enveloped
NoSuchTableException (a genuinely missing table) is an Error::Delta
and returns false here, so callers can fall back on a missing route
without masking a missing table.
Sourcepub fn should_fall_back_to_legacy(&self) -> bool
pub fn should_fall_back_to_legacy(&self) -> bool
Whether the caller should react to this /delta/v1 loadTable error by
falling back to the legacy UC table API (filesystem snapshot): an
unsupported table format, an unimplemented endpoint, or an entirely missing
route. A genuine NoSuchTable/auth/other error returns false and must be
propagated.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()