jpoz / APNS

An Apple Push Notification Service gem
MIT License
543 stars 195 forks source link

APNS.send_notifications doesn't handle bad device token well #27

Open ianlin0126 opened 10 years ago

ianlin0126 commented 10 years ago

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:

Is it possible to fix this issue?

sdaswani-lookout commented 10 years ago

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.