You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2022. It is now read-only.
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
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:
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.
The text was updated successfully, but these errors were encountered: