pub enum SdkError {
ApiResponse {
body: Option<Value>,
operation_id: String,
schema_name: Option<&'static str>,
status: u16,
},
MissingAuth,
MissingParameter {
location: &'static str,
name: String,
operation_id: String,
},
MissingRequestBody {
operation_id: String,
},
UnexpectedStatus {
expected: u16,
actual: u16,
},
Decode(Error),
InvalidUrl {
base_url: String,
path: String,
},
InvalidPathTemplate {
operation_id: String,
path_template: String,
},
UnknownOperation {
operation_id: String,
},
Transport(TransportError),
}Expand description
Errors raised by the SDK execution layer.
Variants§
ApiResponse
A documented API error payload was returned by the server.
Fields
MissingAuth
A secured request was attempted without configured credentials.
MissingParameter
A required path, query, or header parameter was not provided.
Fields
MissingRequestBody
A required request body was omitted.
UnexpectedStatus
The response status did not match what the caller expected.
Decode(Error)
The response body did not match the expected format.
InvalidUrl
The configured base URL or request path could not be resolved.
Fields
InvalidPathTemplate
The operation path template still contained unresolved placeholders after encoding.
Fields
UnknownOperation
No generated descriptor matched the requested operation ID.
Transport(TransportError)
The underlying transport failed.
Trait Implementations§
Source§impl Error for SdkError
impl Error for SdkError
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<TransportError> for SdkError
impl From<TransportError> for SdkError
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SdkError
impl !RefUnwindSafe for SdkError
impl Send for SdkError
impl Sync for SdkError
impl Unpin for SdkError
impl UnsafeUnpin for SdkError
impl !UnwindSafe for SdkError
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