Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

add better logging for failed sns deliveries (#1650)

Sean Aye6ba7374dfdb8
diff --git a/rust/cloud-storage/notification/src/outbound/mobile.rs b/rust/cloud-storage/notification/src/outbound/mobile.rs
index 8f17ed83fc..14911177f7 100644
--- a/rust/cloud-storage/notification/src/outbound/mobile.rs
+++ b/rust/cloud-storage/notification/src/outbound/mobile.rs
@@ -60,7 +60,13 @@ impl MobilePushOps for aws_sdk_sns::Client {
.message(payload)
.set_message_attributes(Some(attributes))
.send()
- .await?;
+ .await
+ .map_err(|e| {
+ rootcause::report!(
+ "SNS publish to {endpoint_arn} failed: {}",
+ aws_sdk_sns::error::DisplayErrorContext(&e)
+ )
+ })?;
Ok(output.message_id.unwrap_or_default())
}