Skip to content

ErrorResponse Interface is missing statusCode key #286

Description

@jayanthtn

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

message: string;
the ErrorResponse interface has only name and message keys.

statusCode must be added to it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions