macro_rules! dynamodb_error {
($code:ident) => { ... };
($code:ident, $msg:expr) => { ... };
}Expand description
Create a DynamoDBError from an error code.
ยงExamples
use rustack_dynamodb_model::dynamodb_error;
use rustack_dynamodb_model::error::DynamoDBErrorCode;
let err = dynamodb_error!(ValidationException);
assert_eq!(err.code, DynamoDBErrorCode::ValidationException);
let err = dynamodb_error!(ResourceNotFoundException, "Table not found");
assert_eq!(err.message, "Table not found");