Handle uncaught 'Unregistered' not being caught by 410 status code #439
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary:
Number one uncaught fatal right now is from sidekiq retrying to to deliver APNs that does not catch my token clean up proc, so it will continue to retry until retired into dead queue.
Description:
Raise with http status code for additional debugging context.
response.status == "410"
is currently not catching it. Consider abad_token?
true ifresponse.body["reason"]
equals 'Unregistered'. I have no idea at the moment, why the status code isn't catching it. The error doesn't surprise me because of the velocity of different bundle ids/entitlements/environments i'm testing with. Just 4 users (most likely all me) responsible >3k+ errors (retry policy), but is never able to clean up.I read this three times and have no idea what it means, but seems like it's probably responsible
https://developer.apple.com/documentation/usernotifications/handling-notification-responses-from-apns#Understand-error-codes
Testing:
None yet, will be pushing straight to production to snag the actual http status code
Screenshots (if applicable):
Checklist:
Additional Notes: