Firebase Messaging: FirebaseError should be exposed so that we can have access to ErrorCode and other error details from the api
AustinHunt opened this issue · comments
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 (
firebase-admin-go/internal/errors.go
Line 87 in 74c9bd5
I found a few problems with this issue:
- I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
- This issue does not seem to follow the issue template. Make sure you provide all the required information.