pub trait ServiceError: Error {
    fn error_code(&self) -> &'static str;
    fn http_status(&self) -> StatusCode;
}
Expand description

A trait for errors that can be converted to an HTTP response and a string error code.

Error codes typically are more descriptive than HTTP status reasons. The AWS Identity and Access Management Common Errors reference has examples of typical error codes, including IncompleteSignature, InvalidAction, InvalidClientTokenId, InvalidParameterCombination, etc.

Required Methods§

The string status code for this error.

The HTTP status code for this error.

Implementors§