Closed AustinHunt closed 11 months ago
The messaging api returns robust error codes to tell your application what went wrong with the server. This go-lang library abstracts this away and only gives you the following struct: https://github.com/firebase/firebase-admin-go/blob/v4.12.0/messaging/messaging_batch.go#L78
This makes it impossible to react to different kinds of failures when calling sendBatch. In my case, I want to invalid device tokens from my database.
sendBatch
If the lib could return this struct (https://github.com/firebase/firebase-admin-go/blob/74c9bd5edece6044ba365a04c32c00074006dd7c/internal/errors.go#L87) instead of the standard error the issue would be resolved.
I found a few problems with this issue:
The messaging api returns robust error codes to tell your application what went wrong with the server. This go-lang library abstracts this away and only gives you the following struct: https://github.com/firebase/firebase-admin-go/blob/v4.12.0/messaging/messaging_batch.go#L78
This makes it impossible to react to different kinds of failures when calling
sendBatch
. In my case, I want to invalid device tokens from my database.If the lib could return this struct (https://github.com/firebase/firebase-admin-go/blob/74c9bd5edece6044ba365a04c32c00074006dd7c/internal/errors.go#L87) instead of the standard error the issue would be resolved.