| 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. | |