Skip to content

Commit 4eaa9a0

Browse files
author
JR Conlin
authored
bug: Use warn!() to supplement sentry errors, since they don't show up regularly. (#449)
1 parent b55bbe7 commit 4eaa9a0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

autoendpoint/src/routers/fcm/client.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,12 @@ impl FcmClient {
159159
.await
160160
.map_err(FcmError::DeserializeResponse)?;
161161
if raw_data.is_empty() {
162+
warn!("Empty GCM response [{status}]");
162163
return Err(FcmError::EmptyResponse(status).into());
163164
}
164165
let data: GcmResponse = serde_json::from_slice(&raw_data).map_err(|e| {
165166
let s = String::from_utf8(raw_data.to_vec()).unwrap_or_else(|e| e.to_string());
167+
warn!("Invalid GCM response [{status}], \"{s}\"");
166168
FcmError::InvalidResponse(e, s, status)
167169
})?;
168170

@@ -251,10 +253,12 @@ impl FcmClient {
251253
.await
252254
.map_err(FcmError::DeserializeResponse)?;
253255
if raw_data.is_empty() {
256+
warn!("Empty FCM response [{status}]");
254257
return Err(FcmError::EmptyResponse(status).into());
255258
}
256259
let data: FcmResponse = serde_json::from_slice(&raw_data).map_err(|e| {
257260
let s = String::from_utf8(raw_data.to_vec()).unwrap_or_else(|e| e.to_string());
261+
warn!("Invalid FCM response [{status}] \"{s}\"");
258262
FcmError::InvalidResponse(e, s, status)
259263
})?;
260264

0 commit comments

Comments
 (0)