Closed cjbell closed 2 weeks ago
Maybe it would be better to actually look at the error code? Here's the decoded response body for an unregistered token:
%{
"error" => %{
"code" => 404,
"details" => [
%{
"@type" => "type.googleapis.com/google.firebase.fcm.v1.FcmError",
"errorCode" => "UNREGISTERED"
}
],
"message" => "Requested entity was not found.",
"status" => "NOT_FOUND"
}
}
Currently an unregistered token in FCM will return an
unknown_error
response, which is incorrect. This PR correctly returns anunregistered
atom for this case.The error coming back from FCM is: