Repository navigation
Don't deactivate FCM devices on payload errors - #818
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #818 +/- ##
==========================================
+ Coverage 74.46% 74.65% +0.18%
==========================================
Files 32 32
Lines 1359 1365 +6
Branches 225 227 +2
==========================================
+ Hits 1012 1019 +7
Misses 300 300
+ Partials 47 46 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
776e8fd to
ededa82
Compare
50-Course
left a comment
There was a problem hiding this comment.
thank you for this. approved.
There was a problem hiding this comment.
lgtm, fix itself looks correct, however, requested changes due to small nitpicks. one cleanup before approval: InvalidArgumentError is now fully handled by the isinstance branch you have and always returns there, so its entry in fcm_error_list is dead for the exception path.
could you please remove it from there so the final type(exc) in fcm_error_list only represents errors that still deactivate by type and the intent stays clear?
|
@50-Course Removed it. I kept it because |
FCM returns INVALID_ARGUMENT for both bad tokens and bad payloads, so a payload error deactivates devices with valid tokens. Only deactivate when the error details name
message.tokenas the invalid field.Fixes #817