Skip to content

How to convert aws_sdk_s3::Error to lambda_runtime::Error? #761

Answered by evbo
evbo asked this question in Q&A
Discussion options

You must be logged in to vote

ah, it appears the Error types are both just Box<dyn Error>, silly me. You can simply do:

.map_err(|e| {
  let backToLambdaError: Error = String::from("error message").into();
  backToLambdaError
});

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Velfi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant