koala73/worldmonitor · error · Error

[createProLaunchBroadcast] Resend response missing id

Error message

[createProLaunchBroadcast] Resend response missing id: ${JSON.stringify(json)}

What it means

Response-shape guard after a successful Resend broadcast create: the JSON body parsed (or failed to parse) without an `id` field. Without a broadcast id the caller cannot preview, send, or track the broadcast, so the action refuses to return a result — even though Resend may actually have created the broadcast.

Solutions

  1. Check the Resend dashboard for a broadcast matching the request — it may exist despite the unparseable response
  2. Treat as a Resend API contract change: inspect the logged JSON and adapt the parser if the field was renamed
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at convex/broadcast/sendBroadcast.ts:121 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/ba99b381053cb882. Report an issue: GitHub.

Appendix: source

Thrown at convex/broadcast/sendBroadcast.ts:121

        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,
    };
  },
});

/**
 * Send (or schedule) a previously-created Resend Broadcast.
 *
 * `scheduledAt`: ISO 8601 timestamp string OR a natural-language phrase
 * Resend accepts ("in 2 hours"). Omit for immediate send.

View on GitHub (pinned to eeab0a219f)