Attach the server error response to failed notifications #67

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@Chipairon
Contributor

Add the ability to set notification server error information per notification while trying to send a push.
It also logs the error if any. The logger is customizable.

More information about APNS errors on table 5.1 Error Codes:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html

@mattt
Contributor
mattt commented Aug 9, 2014

Thanks for your PR, @Chipairon. I merged with a few changes:

  • Declaring an explicit logger seemed cumbersome and unnecessary since it's really just a matter of printing notification.error, so I removed that in favor of having applications log errors as desired.
  • Notification errors are now an instance of Houston::Notification::APNSError, which defines error codes in a constant.

I'll tag a new release with these changes shortly. Thanks again!

@mattt mattt closed this Aug 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment