Skip to content

Does statusCode "400" mean the subscription has expired? #101

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

Closed
marcovtwout opened this issue May 10, 2017 · 3 comments
Closed

Does statusCode "400" mean the subscription has expired? #101

marcovtwout opened this issue May 10, 2017 · 3 comments
Labels

Comments

@marcovtwout
Copy link
Contributor

https://github.com/web-push-libs/web-push-php/blob/master/src/WebPush.php#L158

$error['expired'] = in_array($statusCode, array(400, 404, 410));

This code currently considers http 400 as "expired subscription". I don't think this is correct, in most cases it means something else is wrong with the request. Should 400 be removed from this list?

Background info:

@Minishlink
Copy link
Member

Thanks for your feedback. It was the case some time ago, but hopefully it's now more standardized. Let's remove the 400 case. :)

If you want to do a PR that's very welcome!

@marcovtwout
Copy link
Contributor Author

Here it is: #103

@Minishlink
Copy link
Member

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants