Welcome back - hope you had a relaxing vacation!
Yes, I am referring to the HTTP status code, e.g.
413 PayloadTooLarge
Since we are currently using the notnoop lib, we have:
https://github.com/notnoop/java-apns/blob/master/src/main/java/com/notnoop/apns/DeliveryError.javawhich maps the APNS return code from Table 8-6 here:
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.htmlOur use-case is that we are writing a RESTful service to handle the sending of the Push notifications (gratefully using your Pushy lib :) for various clients here.
Moreover, we have a contract with those clients that we will only return a certain set of responses. (generalized across WNS, APNS, and GCM)
So our proxy maps the APNS return code to a smaller subset of client responses. (e.g. 400, 413, 500, 503)
Either way, our proxy needs to return some status code back to our HTTP clients.
It is easy enough for us to map the rejectReason string back to a numeric status code, so this is not a show-stopper by any means.
Just wanted to bounce it off the team here, since it seems unnecessarily inefficient.
Thanks!
n8