Hi
As stated in the master example we create a list of recipient tokens, generate a message for each receiver token and then send all those messages in one scope.
However, in response, we can get errors per each sent message, where one of them could be DeviceNotRegistered if the receiver somehow managed to opt-out from Expo, and our stored token no longer valid.
In that case, logically, I would have to delete such outdated token from my DB, however, at the moment it is not possible to match that specific error to initial list of tokens we build at the beginning
I had to dig through Expo API documentation and find out, that they are also not returning this token in a nice format as K, V entry, however, I spot that token itself present in the error string message:
{
"data": [
{
"status": "error",
"message": "\"ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]\" is not a registered push notification recipient",
"details": {
"error": "DeviceNotRegistered"
}
]
}
So as a feature I would like to request to parse it nicely at the library SDK end, and provide nice method getInvalidToken() so that parsing functionality will be part of SDK, rather then each one will have own implementation of error string parse
P.S. I also opened a ticket with Expo to include the token as an individual field in the response.
Hi
As stated in the master example we create a list of recipient tokens, generate a message for each receiver token and then send all those messages in one scope.
However, in response, we can get errors per each sent message, where one of them could be
DeviceNotRegisteredif the receiver somehow managed to opt-out from Expo, and our stored token no longer valid.In that case, logically, I would have to delete such outdated token from my DB, however, at the moment it is not possible to match that specific error to initial list of tokens we build at the beginning
I had to dig through Expo API documentation and find out, that they are also not returning this token in a nice format as K, V entry, however, I spot that token itself present in the error string message:
So as a feature I would like to request to parse it nicely at the library SDK end, and provide nice method
getInvalidToken()so that parsing functionality will be part of SDK, rather then each one will have own implementation of error string parseP.S. I also opened a ticket with Expo to include the token as an individual field in the response.