koala73/worldmonitor · error · Error

[createProLaunchBroadcast] Resend

Error message

[createProLaunchBroadcast] Resend ${res.status}: ${body}

What it means

Resend API rejection while creating a broadcast: the POST returned a non-OK HTTP status, and the message embeds the status code and response body. Causes range from an invalid segment_id and auth problems to rate limits (429) — the body text distinguishes them.

Solutions

  1. Read the embedded status and body: fix the segment_id or payload for 4xx, retry with backoff for 429/5xx
  2. Verify RESEND_API_KEY is valid and the account has broadcast access
  3. If the segment was deleted in Resend, re-create it before retrying the broadcast
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at convex/broadcast/sendBroadcast.ts:112 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of koala73/worldmonitor@eeab0a219f (2026-08-21). Data as JSON: /api/errors/f3835063a8ea7291. Report an issue: GitHub.

Appendix: source

Thrown at convex/broadcast/sendBroadcast.ts:112

      headers: {
        "Content-Type": "application/json",
        Authorization: `Bearer ${apiKey}`,
        "User-Agent": USER_AGENT,
      },
      body: JSON.stringify({
        name,
        segment_id: segmentId,
        from: PRO_LAUNCH_FROM,
        reply_to: PRO_LAUNCH_REPLY_TO,
        subject: PRO_LAUNCH_SUBJECT,
        html: PRO_LAUNCH_HTML,
        text: PRO_LAUNCH_TEXT,
      }),
    });

    if (!res.ok) {
      const body = await res.text().catch(() => "<no body>");
      throw new Error(
        `[createProLaunchBroadcast] Resend ${res.status}: ${body}`,
      );
    }

    const json = (await res.json().catch(() => null)) as {
      id?: string;
    } | null;
    if (!json?.id) {
      throw new Error(
        `[createProLaunchBroadcast] Resend response missing id: ${JSON.stringify(json)}`,
      );
    }

    return {
      broadcastId: json.id,
      name,
      segmentId,
      subject: PRO_LAUNCH_SUBJECT,

View on GitHub (pinned to eeab0a219f)