Uniqush apns error messages

80 views
Skip to first unread message

Serafino Sorleti

unread,
Nov 13, 2014, 7:08:08 AM11/13/14
to uni...@googlegroups.com
Hi Monnand,

I was giving a look to payload size check (on iOS8 now it is 2k) and i was thinking about disabling the check instead of setting the new limit... I saw a piece of code:

func apnsresToError(apnsres *apnsResult, psp *PushServiceProvider, dp *DeliveryPoint) error { var err error switch apnsres.status { case 0: err = nil case 1: err = NewBadDeliveryPointWithDetails(dp, "Processing Error") case 2: err = NewBadDeliveryPointWithDetails(dp, "Missing Device Token") case 3: err = NewBadNotificationWithDetails("Missing topic") case 4: err = NewBadNotificationWithDetails("Missing payload") case 5: err = NewBadNotificationWithDetails("Invalid token size") case 6: err = NewBadNotificationWithDetails("Invalid topic size") case 7: err = NewBadNotificationWithDetails("Invalid payload size") case 8: // err = NewBadDeliveryPointWithDetails(req.dp, "Invalid Token") // This token is invalid, we should unsubscribe this device. err = NewUnsubscribeUpdate(psp, dp) default: err = fmt.Errorf("Unknown Error: %d", apnsres.status) } return err } In the apns.go file. It seems to me that the err = NewBadNotificationWithDetails("Invalid payload size") is not logged anywhere (not in collect result, in fixError). It seems that if it is not an UnsubscribeError it is not assigned to res.err in waitResults and so fixError (as it is not an error that has to be fixed) and collect result (res.Err == nil) log as successful push. Is it right? Thanks in advance for your reply, Serafino.


Reply all
Reply to author
Forward
0 new messages