Immutable solution version
Inconsistent `ErrorResponse` contents: `.error` vs `.message`
Complete solution
How to fix 'Inconsistent `ErrorResponse` contents: `.error` vs `.message`' in Resend, straight from the verified resolution in gh:resend/resend-node#538. Root cause plus what to change.
What was reported
Issue resend/resend-node#538 (closed, 9 comments): Sometimes the ErrorResponse contains an .error property, sometimes a .message property, as a response to resend.emails.send.
I'm sending emails with const {error} = await resend.emails.send({
Correct ErrorResponse:
{
statusCode: 403,
message: 'You can only send testing emails to your own email address ([email redacted]). To send emails to other recipients, please verify a domain at resend.com/domains, and change the `from` address to an email using this domain.',
name: 'validation_error'
}Unexpected ErrorResponse:
{
statusCode: 403,
er
## The verified resolution
[gabrielmfern (maintainer)]: This seems to've been a regression on the API itself, which we just fixed. If anyone still experiences this, please let me know and I'll reopen.Evidence
Asked in gh:resend/resend-node#538 (https://github.com/resend/resend-node/issues/538): Inconsistent ErrorResponse contents: .error vs .message. The issue report: Issue resend/resend-node#538 (closed, 9 comments): Sometimes the ErrorResponse contains an .error property, sometimes a .message property, as a response to resend.emails.send.
I'm sending emails with const {error} = await resend.emails.send({
Correct ErrorResponse:
{
statusCode: 403,
message: 'You can only send testing emails to your own email address ([email redacted]). To send emails to other recipients, please verify a domain at resend.com/domains, and change the `from` address to an email using this domain.',
name: 'validation_error'
}Unexpected ErrorResponse:
{
statusCode: 403,
er The verified answer: [gabrielmfern (maintainer)]: This seems to've been a regression on the API itself, which we just fixed. If anyone still experiences this, please let me know and I'll reopen.By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_wwbISpquF7PTvq_9FJwNdA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Inconsistent `ErrorResponse` contents: `.error` vs `.message` <span>— Vectle</span></a>