From 5bfaa0b5a849201361acab5da5b575c1a10d9355 Mon Sep 17 00:00:00 2001 From: exoego Date: Thu, 28 Mar 2024 23:11:22 +0900 Subject: [PATCH] Output function error only if it exists --- src/lambda_invoker.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lambda_invoker.rs b/src/lambda_invoker.rs index 63709ea..f09e3b4 100644 --- a/src/lambda_invoker.rs +++ b/src/lambda_invoker.rs @@ -58,7 +58,9 @@ impl LambdaInvoker { .payload(self.payload.clone()) .send() .await?; - info!("Function error: {:?}", result.function_error); + result + .function_error() + .map(|e| warn!("Function error: {:?}", e)); Ok(result.function_error.is_none()) }