According to https://firebase.google.com/docs/cloud-messaging/admin/errors, clients should honor Retry-After header for messaging/server-unavailable and messaging/internal-error.
However, the MessagingDevicesResponse does not include a Retry-After header.
It is up to the server to decide whether to include that header in the response or not. If it is not present in the response, the client may retry immediately.
Thanks, @hiranya911 !
I don't know how I can check if the header exists. The formatted response does not mention it. https://firebase.google.com/docs/reference/admin/node/admin.messaging.MessagingDevicesResponse.
I suppose we need to expose that header in the response somehow. Will look into it.
Hello @hiranya911,
Is there any update on it?
I can't find anything in the docs or in the code.
Cheers
@sdomagala there hasn't been much direct progress on this. However, we recently re-implemented how the SDK makes HTTP calls (see #280 and all the PRs referenced therein). This makes it easier for us to support this requirement.
We now have the ability to refer to response headers in the FCM module. Just need to figure out how to expose that information through the public API.
Just sent #518 for review, which implements the retry framework for the SDK.
As of #556 the SDK automatically retries on 503 errors (up to 4 retries), and it also honors the Retry-After header when available. Otherwise it would use regular exponential backoff.
Most helpful comment
I suppose we need to expose that header in the response somehow. Will look into it.