Azure Comms Service returning RestError due to time difference when email volume is high
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