Untraceable errors in email sending

I am getting these errors with a 504 status code when i use v3/messages/send

  1. Post “https://graph.microsoft.com/v1.0/me/messages/<access_token>/createReply”: context deadline exceeded (Client.Timeout exceeded while awaiting headers)
  2. Post “https://graph.microsoft.com/v1.0/me/messages”: context deadline exceeded (Client.Timeout exceeded while awaiting headers)

This is the complete error when i visit the microsoft graph api url, with additional attributes in the innerError object – client-request-id and request-id
Can I get help on what could be the possible reasons and root causes for these errors?

Randomly, some emails fail while majority of them are successful. What is the reason access token is empty, because I am using the same nylas sdk and application logic to send all emails

Hi Klight,

The 504 errors you’re seeing with “context deadline exceeded” indicate that Nylas is having trouble connecting to Microsoft Graph, and the requests are timing out.

Some common causes for these request timeouts are that either your Exchange server might have too many requests to process, causing delays that exceed Nylas’ 90-second request SLA, or the Microsoft Graph API might be temporarily slow or unresponsive. Have you tried resending the request? This is often a temporary issue, and we recommend an “exponential backoff and retry” approach, which means something like "wait 5 seconds, then retry, then wait 10 seconds, then retry, then wait 20 seconds, etc.

Best,

Nomi Reiss, Nylas

1 Like