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

Response not being handled #45

Open
markst opened this issue Mar 28, 2017 · 1 comment
Open

Response not being handled #45

markst opened this issue Mar 28, 2017 · 1 comment
Assignees

Comments

@markst
Copy link

markst commented Mar 28, 2017

Only response 410 is being handled by apns.
We need to handle all the errors appropriately.

Ideally return the error status-code & reason to the owner scheduling.

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html#//apple_ref/doc/uid/TP40008194-CH11-SW1

Table 8-4Status codes for an APNs response

Status code

Description

200

Success

400

Bad request

403

There was an error with the certificate or with the provider authentication token

405

The request used a bad :method value. Only POST requests are supported.

410

The device token is no longer active for the topic.

413

The notification payload was too large.

429

The server received too many requests for the same device token.

500

Internal server error

503

The server is shutting down and unavailable.

@markst
Copy link
Author

markst commented Mar 28, 2017

At the very least log out to rails logger with the response if not 200

https://github.com/Papercloud/notify_user/blob/feature/apns-http2/app/models/notify_user/apns.rb#L38

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

No branches or pull requests

2 participants