#[non_exhaustive]pub enum UcApiError {
InvalidParameter {
message: String,
},
Unauthenticated {
message: String,
},
PermissionDenied {
message: String,
},
NotFound {
message: String,
},
AlreadyExists {
message: String,
},
RequestLimitExceeded {
message: String,
},
InternalError {
message: String,
},
TemporarilyUnavailable {
message: String,
},
Other {
status: u16,
error_code: String,
message: String,
},
}Expand description
Typed error variants mapped to the Databricks Unity Catalog API error code spec.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidParameter
Unauthenticated
PermissionDenied
NotFound
AlreadyExists
RequestLimitExceeded
InternalError
Other
Implementations§
Source§impl UcApiError
impl UcApiError
Sourcepub fn error_code(&self) -> &str
pub fn error_code(&self) -> &str
Returns the UC API error code string.
Sourcepub fn http_status(&self) -> u16
pub fn http_status(&self) -> u16
Returns the HTTP status code associated with this error.
Sourcepub fn from_api_response(status: u16, error_code: &str, message: String) -> Self
pub fn from_api_response(status: u16, error_code: &str, message: String) -> Self
Construct from an API response with status code, error code string, and message.
Trait Implementations§
Source§impl Clone for UcApiError
impl Clone for UcApiError
Source§fn clone(&self) -> UcApiError
fn clone(&self) -> UcApiError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UcApiError
impl Debug for UcApiError
Source§impl Display for UcApiError
impl Display for UcApiError
impl Eq for UcApiError
Source§impl Error for UcApiError
impl Error for UcApiError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<UcApiError> for Error
impl From<UcApiError> for Error
Source§fn from(source: UcApiError) -> Self
fn from(source: UcApiError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UcApiError
impl PartialEq for UcApiError
Source§fn eq(&self, other: &UcApiError) -> bool
fn eq(&self, other: &UcApiError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UcApiError
Auto Trait Implementations§
impl Freeze for UcApiError
impl RefUnwindSafe for UcApiError
impl Send for UcApiError
impl Sync for UcApiError
impl Unpin for UcApiError
impl UnsafeUnpin for UcApiError
impl UnwindSafe for UcApiError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.