[][src]Module lambda_runtime::error

The error module exposes the HandlerError type.

Re-exports

pub use lambda_runtime_core::LambdaErrorExt;

Structs

HandlerError

The HandlerError struct can be use to abstract any Err of the handler method Result. The HandlerError object can be generated From any object that supports Display, Send, Sync, and Debug. This allows handler functions to return any error using the ?syntax. For examplelet _age_num: u8 = e.age.parse()?;will return the::Err` from the handler function.

Traits

LambdaErrorExt

The LambdaErrorExt trait defines the error_type() method used by the AWS Lambda runtime client to generate ErrorResponse objects. The value returned by the error_type() method is used to populate the errorType field in the Lambda response. This crate includes an implementation of this trait for most errors in the standard library. By default, error return their type name.

LambdaResultExt

Result type extension for AWS that makes it easy to generate a HandlerError object or a Compat<Error> from the failure crate using an existing result. This trait should be imported from the lambda_runtime_core or lambda_runtime crates.