Azure Comms Service returning RestError due to time difference when email volume is high

Matt Worsley 0 Reputation points
2025-03-12T17:37:29.1533333+00:00

I'm using the @azure/communication-email EmailClient SDK in my Node server (hosted as an App Service). The client listens for 'email-ready' events my Service Bus (via business logic in my app) and sends the email using emailClient.beginSend().

It works fine apart from when volumes are higher, say 100 sends per minute. In those cases it returns, intermittently, the error :

RestError: The given request could not be resolved. The time difference between the originating client and the server is greater than the allowed margin of 5 minutes. at handleErrorResponse (C:\home\site\wwwroot\node_modules\@azure\core-client\dist\commonjs\deserializationPolicy.js:148:19) at deserializeResponseBody (C:\home\site\wwwroot\node_modules\@azure\core-client\dist\commonjs\deserializationPolicy.js:83:45) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I can't find any guidance on this error in the docs. All I can do at the moment is implement retry logic, but if the volume is consitantly high, it just keeps raising the same error over and over.

I have checked on Kudu and the server time on my App Service is correct and hasn't drifted during these peak periods

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,039 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.