Skip to content

adding device_token to Push::DeliveryError #5

Open
wants to merge 1 commit into from

2 participants

@tilo
tilo commented Mar 17, 2014

adding device_token to Push::DeliveryError
... to better surface in the logs which device_token was invalid in case there were errors

@tilo
tilo commented Mar 18, 2014

works nice for me in prod

@tilo tilo commented on the diff Apr 6, 2014
lib/push/message_apns.rb
@@ -86,7 +86,7 @@ def check_for_error(connection)
cmd, code, notification_id = tuple.unpack("ccN")
description = APN_ERRORS[code.to_i] || "Unknown error. Possible push bug?"
- error = Push::DeliveryError.new(code, notification_id, description, "APNS")
+ error = Push::DeliveryError.new(code, notification_id, description, "APNS", true, device)
@tilo
tilo added a note Apr 6, 2014

it would be more elegant to just hand-in the complete instance of the message as the second parameter.
what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.