-
Notifications
You must be signed in to change notification settings - Fork 73
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
How to handle Net::HTTPBadRequest 400 InvalidTokenFormat? #52
Comments
Seems like this could be added pretty easily: webpush/lib/webpush/request.rb Lines 29 to 40 in f380b76
Maybe it was not a known error/response code before now? |
Does |
I did change some parts on |
@Rubioli thanks for the information, however can you be more specific?
|
I have spent some time investigating these issues, here's my results:
1-2: FCM and Autopush have slightly different behaviors and this library reflects that properly. FCM doesn't even check if the endpoint exists when the VAPID key is not associated to that endpoint, and thus returns an authentication failure. Autopush on the other hand first check if the endpoint exists, and thus returns 404. |
From time to time we're getting this error:
Any reason why this isn't handled as
Webpush::InvalidSubscription
by the gem?The text was updated successfully, but these errors were encountered: