forked from panicbit/fcm-rust
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I received this FcmResponse
FcmResponse {
http_status_code: 404,
response_json_object: {
"error": Object {
"code": Number(404),
"message": String("Requested entity was not found."),
"status": String("NOT_FOUND"),
"details": Array [
Object {
"@type": String("type.googleapis.com/google.firebase.fcm.v1.FcmError"),
"errorCode": String("UNREGISTERED"),
},
],
},
},
retry_after: None,
}
That is FcmError enum variant UNREGISTERED. If similar JSON response is also used for enum variant UNSPECIFIED_ERROR then current code detects FcmResponseError::Unknown and not the correct FcmResponseError::Unspecified.
The FCM v1 API docs do not have exact JSON location for the FcmError. Only the successful JSON respose is documented for send HTTP route. Because of that I think it would be the best to remove the FcmResponseError::Unspecified. Should I do PR which does that?
Metadata
Metadata
Assignees
Labels
No labels