Skip to content

Commit

Permalink
chore: extra logs for FCM Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryET committed Aug 29, 2023
1 parent b7c019b commit 6079231
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/providers/fcm.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use tracing::error;
use {
crate::{
blob::DecryptedPayloadBlob,
Expand Down Expand Up @@ -68,7 +69,10 @@ impl PushProvider for FcmProvider {
| ErrorReason::InvalidRegistration
| ErrorReason::NotRegistered => Err(Error::BadDeviceToken),
ErrorReason::InvalidApnsCredential => Err(Error::BadApnsCredentials),
e => Err(Error::FcmResponse(e)),
e => {
error!("FcmResponse Error on line 82, {:?}", e);
Err(Error::FcmResponse(e))
},
}
} else {
// Note: No Errors in the response, this request was good
Expand All @@ -77,7 +81,10 @@ impl PushProvider for FcmProvider {
}
Err(e) => match e {
FcmError::Unauthorized => Err(Error::BadFcmApiKey),
e => Err(Error::Fcm(e)),
e => {
error!("Fcm Error on line 82, {:?}", e);
Err(Error::Fcm(e))
},
},
}
}
Expand Down

0 comments on commit 6079231

Please sign in to comment.