It makes sense to allow messages that can be sent to be sent as part of the for loop in bulk_send_message, however, it is still prudent to bubble up an exception. I suggest that you allow the loop to continue, collect all the registration ids that are bad and is all of them are bad raise a BadDeviceToken else if some fail return a new PartialBulkMessage exception which explains which ones have failed and binds the failed ids to the exception for further processing.
It makes sense to allow messages that can be sent to be sent as part of the for loop in
bulk_send_message
, however, it is still prudent to bubble up an exception. I suggest that you allow the loop to continue, collect all the registration ids that are bad and is all of them are bad raise aBadDeviceToken
else if some fail return a newPartialBulkMessage
exception which explains which ones have failed and binds the failed ids to the exception for further processing.