build(deps): bump error-stack from version 0.3.1 to 0.4.1 (#4188)

This commit is contained in:
Sanchith Hegde
2024-04-01 12:31:17 +05:30
committed by GitHub
parent cb2000b088
commit ea730d4ffc
286 changed files with 1361 additions and 2397 deletions

View File

@ -2,7 +2,7 @@ use aws_config::{self, meta::region::RegionProviderChain, Region};
use aws_sdk_lambda::{types::InvocationType::Event, Client};
use aws_smithy_types::Blob;
use common_utils::errors::CustomResult;
use error_stack::{IntoReport, ResultExt};
use error_stack::{report, ResultExt};
use crate::errors::AnalyticsError;
@ -25,10 +25,9 @@ pub async fn invoke_lambda(
.payload(Blob::new(json_bytes.to_owned()))
.send()
.await
.into_report()
.map_err(|er| {
let er_rep = format!("{er:?}");
er.attach_printable(er_rep)
report!(er).attach_printable(er_rep)
})
.change_context(AnalyticsError::UnknownError)
.attach_printable("Lambda invocation failed")?;