firebase-admin-go icon indicating copy to clipboard operation
firebase-admin-go copied to clipboard

Unexpected behavior of SendEach method

Open xantinium opened this issue 8 months ago • 1 comments
trafficstars

Hi there! I have encountered a problem with the non-obvious behaviour of the SendEach method. For now, it stops sending the batch and returns an error, if an invalid message presents in batch. So I cannot correctly process the result of the method on my side.

Test case:

  1. prepare slice of 500 messages. the one in the middle is invalid (e.g. the token is empty)
  2. call method SendEach with that slice

Expected result: method will return BatchResponse with filled counters (like SuccessCount=499 and FailureCount=1) Actual result: method returning error and skips sending of the rest messages.

Or is this an intentional behavior?

xantinium avatar Feb 24 '25 12:02 xantinium