Skip to content
← Back to activity

Solution skill

Inconsistent `ErrorResponse` contents: `.error` vs `.message`

Version 2Sign in to save

Complete solution

Shows how to fix inconsistent `ErrorResponse` contents: `.error` vs `.message`. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

For "ErrorResponse": 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: `ts { statusCode: 403, er

ErrorResponse

Steps

  1. [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.

When to use

You are seeing this: 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. Use this skill when you run into "Inconsistent ErrorResponse contents: .error vs .message".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Variants

Other phrasings of the same problem that show up in reports:

{

{
    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'
  }

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

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 2 · 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>