If, for example, you attempt to send an email with malformed email ID, say " abc@gmail.com", resend.emails.send() throws an error with the following message
{
name: 'validation_error',
statusCode: 422,
message: 'Invalid `to` field. The email address needs to follow the `email@example.com` or `Name <email@example.com>` format.'
}
But, as you can see from
the ErrorResponse interface has only
name and
message keys.
statusCode must be added to it.
If, for example, you attempt to send an email with malformed email ID, say " abc@gmail.com",
resend.emails.send()throws an error with the following messageBut, as you can see from
resend-node/src/interfaces.ts
Line 20 in c895d3e
nameandmessagekeys.statusCodemust be added to it.