Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle uncaught 'Unregistered' not being caught by 410 status code #439

Closed

Conversation

rromanchuk
Copy link
Contributor

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 a bad_token? true if response.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

Table 3 lists the keys found in the JSON dictionary for unsuccessful requests. The JSON data might also be included in a GOAWAY frame when a connection is terminated.

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):
Screenshot 2024-04-17 at 9 47 28 PM

Screenshot 2024-04-17 at 9 48 40 PM

Checklist:

  • Code follows the project's coding standards
  • Tests have been added or updated to cover the changes
  • Documentation has been updated (if applicable)
  • All existing tests pass
  • Conforms to the contributing guidelines

Additional Notes:

Sorry, something went wrong.

rromanchuk and others added 3 commits April 17, 2024 21:46
…but not returning a 410 status code (?), so not able to cleanup, and sidekiq moving to dead queue
lol

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@rromanchuk
Copy link
Contributor Author

This is invalid, method symbol/proc was never passed via config, so config[:invalid_token] was why it was branching. Closing for user error, must have missed it when migrating.

@rromanchuk rromanchuk closed this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant