APNS icon indicating copy to clipboard operation
APNS copied to clipboard

APNS.send_notifications doesn't handle bad device token well

Open ianlin0126 opened this issue 11 years ago • 1 comments

I'm observing an issue with the batch notifications method send_notifications

If one of the device token in the request is incorrect due to any reason, the batch notification would stop at the bad token without any error response. An example as the following:

  • T: device token, M: message
  • Send batch notifications for 3 messages T1-M1, T2-M2, T3-M3
  • If T2 is problematic, only T1-M1 would succeed. T3-M3 would fail. The request wouldn't have any error messages indicating that the request have failed

Is it possible to fix this issue?

ianlin0126 avatar Mar 15 '14 09:03 ianlin0126

Yes, I noticed this flaw in the logic too. One straightforward fix would be to handle exceptions on a individual basis and then report back any errors. Feel free to post a fix if you'd like.

sdaswani-lookout avatar Mar 17 '14 16:03 sdaswani-lookout