I am using firebase v4 to push notifications to android devices. When the Send method of the instance of messaging.Client fails, I only get a string error value and I wonder if this error string is localized. If not, I could compare it against e.g. "Requested entity was not found." to detect devices that have uninstalled my app. Is this string always plain english or does this depend on the locale the app is running under? Or does this error string come from the server, so I can never be sure if it stays the same?
What other options do I have to properly detect such an error, even if my golang binary runs on computer systems with any locale or language? I am running my golang binary on windows.
Steps to reproduce:
Send a message that will fail, because the device has uninstalled the app
Relevant Code:
I am using this code to send messages to devices:
response, err := client.Send(ctx, message)
if err != nil {
logger.Info(err)
os.Exit(-536870138) /// -536870138 = 0xE0000306 is ERR_INOTE_FCM_FAILED_SEND
}
Step 2: Describe your environment
Step 3: Describe the problem
I am using firebase v4 to push notifications to android devices. When the Send method of the instance of messaging.Client fails, I only get a string error value and I wonder if this error string is localized. If not, I could compare it against e.g. "Requested entity was not found." to detect devices that have uninstalled my app. Is this string always plain english or does this depend on the locale the app is running under? Or does this error string come from the server, so I can never be sure if it stays the same?
What other options do I have to properly detect such an error, even if my golang binary runs on computer systems with any locale or language? I am running my golang binary on windows.
Steps to reproduce:
Send a message that will fail, because the device has uninstalled the app
Relevant Code:
I am using this code to send messages to devices:
Any help or insights appreciated,
-- Stefan