Struct aws_smithy_types::error::Error
source · pub struct Error { /* private fields */ }
Expand description
Generic Error type
For many services, Errors are modeled. However, many services only partially model errors or don’t
model errors at all. In these cases, the SDK will return this generic error type to expose the
code
, message
and request_id
.
Implementations§
source§impl Error
impl Error
sourcepub fn request_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
Returns the request ID the error occurred for, if it’s available.
sourcepub fn extra(&self, key: &'static str) -> Option<&str>
pub fn extra(&self, key: &'static str) -> Option<&str>
Returns additional information about the error if it’s present.
sourcepub fn into_builder(self) -> Builder
pub fn into_builder(self) -> Builder
Converts an Error
into a builder.
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()