Hi,
I’m sending email with the Node SDK (nylas@8.0.5) and I keep getting a 400 from messages.send.
Provider/API side error (Microsoft):
400 unable to deserialize
error parsing request body
I’m using the v8 SDK like this:
await nylas.messages.send({
identifier: grantId,
requestBody: {
from: [{ name: 'Sender', email: 'sender@example.com' }],
to: [{ name: 'Recipient', email: 'recipient@example.com' }],
replyTo: [{ name: 'Reply', email: 'reply@example.com' }],
subject: 'Test',
body: '<p>Hello</p>',
},
})
Request id where i’ve got this error first today is: 3431756385-1e4739b8-9659-469e-98b7-a5a32acb2304
I also tested without replyTo and still got the same error. No attachments are used.
A few questions:
-
Are there known cases where Nylas returns provider returned error + unable to deserialize even when the JSON looks valid?
-
Is there a way to get the raw request validation error from Nylas, or more detailed provider-side diagnostics?
-
Maybe a bug in Nylas to Microsoft integration somewhere?
Thanks.