{"record":{"id":"1dd6e12e6971255f","repo":"koala73/worldmonitor","slug":"sendprolaunchbroadcast-resend-res-status-e","errorCode":null,"errorMessage":"[sendProLaunchBroadcast] Resend ${res.status}: ${errBody}","messagePattern":"\\[sendProLaunchBroadcast\\] Resend (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"convex/broadcast/sendBroadcast.ts","lineNumber":174,"sourceCode":"    const body: Record<string, unknown> = {};\n    if (scheduledAt) body.scheduled_at = scheduledAt;\n\n    const res = await fetch(\n      `${RESEND_API_BASE}/broadcasts/${encodeURIComponent(broadcastId)}/send`,\n      {\n        method: \"POST\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n          Authorization: `Bearer ${apiKey}`,\n          \"User-Agent\": USER_AGENT,\n        },\n        body: JSON.stringify(body),\n      },\n    );\n\n    if (!res.ok) {\n      const errBody = await res.text().catch(() => \"<no body>\");\n      throw new Error(\n        `[sendProLaunchBroadcast] Resend ${res.status}: ${errBody}`,\n      );\n    }\n\n    return {\n      broadcastId,\n      status: scheduledAt ? \"scheduled\" : \"queued\",\n      scheduledAt: scheduledAt ?? null,\n    };\n  },\n});\n","sourceCodeStart":156,"sourceCodeEnd":186,"githubUrl":"https://github.com/koala73/worldmonitor/blob/eeab0a219fce0f02a00603b532dbae9041b934ac/convex/broadcast/sendBroadcast.ts#L156-L186","documentation":"Resend API rejection while sending (or scheduling) a broadcast: the POST to /broadcasts/{id}/send returned non-OK, with status and body embedded. Common causes are an unknown or deleted broadcastId, an already-sent broadcast, an invalid scheduled_at value, or rate limiting.","triggerScenarios":"Thrown at convex/broadcast/sendBroadcast.ts:174 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the embedded status and body: for 404 verify the broadcastId exists in Resend; for 429/5xx retry with backoff","If already sent, treat as idempotent success and record the send instead of retrying","Validate the scheduled_at format before retrying a scheduled send"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eeab0a219fce0f02a00603b532dbae9041b934ac","analyzedAt":"2026-08-21T16:51:25.751Z","contentChangedAt":"2026-08-21T16:51:25.751Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}