pub struct AwsError {
pub status: StatusCode,
pub code: String,
pub message: String,
pub error_type: ErrorType,
}Expand description
Represents an AWS API error response.
Fields§
§status: StatusCodeHTTP status code (e.g., 404, 400, 500)
code: StringAWS error code (e.g., “NoSuchBucket”, “ResourceNotFoundException”)
message: StringHuman-readable error message
error_type: ErrorTypeError type: “Sender” (client error) or “Receiver” (server error)
Implementations§
Source§impl AwsError
impl AwsError
pub fn not_found(code: impl Into<String>, message: impl Into<String>) -> Self
pub fn bad_request(code: impl Into<String>, message: impl Into<String>) -> Self
pub fn conflict(code: impl Into<String>, message: impl Into<String>) -> Self
pub fn internal(message: impl Into<String>) -> Self
pub fn not_implemented(operation: &str) -> Self
pub fn unknown_operation(operation: &str) -> Self
pub fn access_denied(message: impl Into<String>) -> Self
pub fn access_denied_for( action: &str, principal_arn: &str, resource: &str, ) -> Self
pub fn validation(message: impl Into<String>) -> Self
Trait Implementations§
Source§impl Error for AwsError
impl Error for AwsError
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()
Auto Trait Implementations§
impl Freeze for AwsError
impl RefUnwindSafe for AwsError
impl Send for AwsError
impl Sync for AwsError
impl Unpin for AwsError
impl UnsafeUnpin for AwsError
impl UnwindSafe for AwsError
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