The FCM HTTP v1 API should return an "UNRect" error code when the device is not registered (the application has been removed). However, the API returns 404 "The requested object was not found."
Has anyone experienced this? Is this expected? This is not mentioned anywhere in the documentation.
Can the device be considered unregistered if error 404 with the message "Required object not found"?
Below is the full text of the error received.
{ "error": { "code": 404, "message": "Requested entity was not found.", "errors": [ { "message": "Requested entity was not found.", "domain": "global", "reason": "notFound" } ], "status": "NOT_FOUND" } }
An exception:
Caused by: com.google.firebase.messaging.FirebaseMessagingException: Requested entity was not found. at com.google.firebase.messaging.FirebaseMessaging.handleSendHttpError(FirebaseMessaging.java:266) ~[firebase-admin-5.9.0.jar:?]
For API reference documentation:
https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages https://firebase.google.com/docs/reference/fcm/rest/v1/ErrorCode
source share