Skip to content

Make errors implement Debug+Display #418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lambda-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ where
where
F: Service<LambdaEvent<A>>,
F::Future: Future<Output = Result<B, F::Error>>,
F::Error: fmt::Display,
F::Error: fmt::Debug + fmt::Display,
A: for<'de> Deserialize<'de>,
B: Serialize,
{
Expand Down Expand Up @@ -125,7 +125,7 @@ where
.into_req()
}
Err(err) => {
error!("{}", err); // logs the error in CloudWatch
error!("{:?}", err); // logs the error in CloudWatch
EventErrorRequest {
request_id,
diagnostic: Diagnostic {
Expand All @@ -137,7 +137,7 @@ where
}
},
Err(err) => {
error!("{:?}", err); // inconsistent with other log record formats - to be reviewed
error!("{:?}", err);
EventErrorRequest {
request_id,
diagnostic: Diagnostic {
Expand Down Expand Up @@ -199,7 +199,7 @@ pub async fn run<A, B, F>(handler: F) -> Result<(), Error>
where
F: Service<LambdaEvent<A>>,
F::Future: Future<Output = Result<B, F::Error>>,
F::Error: fmt::Display,
F::Error: fmt::Debug + fmt::Display,
A: for<'de> Deserialize<'de>,
B: Serialize,
{
Expand Down