{"record":{"id":"a990e0c1fb8f2868","repo":"koala73/worldmonitor","slug":"createprolaunchbroadcast-pro-launch-physical-add","errorCode":null,"errorMessage":"[createProLaunchBroadcast] PRO_LAUNCH_PHYSICAL_ADDRESS is still a placeholder (\"${PRO_LAUNCH_PHYSICAL_ADDRESS}\"). Set the real CAN-SPAM postal address in convex/broadcast/proLaunchEmailContent.ts before sending.","messagePattern":"\\[createProLaunchBroadcast\\] PRO_LAUNCH_PHYSICAL_ADDRESS is still a placeholder \\(\"(.+?)\"\\)\\. Set the real CAN-SPAM postal address in convex/broadcast/proLaunchEmailContent\\.ts before sending\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"convex/broadcast/sendBroadcast.ts","lineNumber":81,"sourceCode":"    nameSuffix: v.optional(v.string()),\n  },\n  handler: async (_ctx, { segmentId, nameSuffix }) => {\n    const apiKey = process.env.RESEND_API_KEY;\n    if (!apiKey) {\n      throw new Error(\"[createProLaunchBroadcast] RESEND_API_KEY not set\");\n    }\n\n    // Hard-gate: refuse to ship the placeholder physical address.\n    // CAN-SPAM requires a valid postal address in every commercial\n    // email footer; sending the literal \"physical address TBD\" string\n    // is non-compliant and embarrassing. Edit\n    // `PRO_LAUNCH_PHYSICAL_ADDRESS` in proLaunchEmailContent.ts to the\n    // real postal address before invoking this action.\n    if (\n      PRO_LAUNCH_PHYSICAL_ADDRESS.includes(\"TBD\") ||\n      PRO_LAUNCH_PHYSICAL_ADDRESS.includes(\"placeholder\")\n    ) {\n      throw new Error(\n        `[createProLaunchBroadcast] PRO_LAUNCH_PHYSICAL_ADDRESS is still a placeholder (\"${PRO_LAUNCH_PHYSICAL_ADDRESS}\"). ` +\n          \"Set the real CAN-SPAM postal address in convex/broadcast/proLaunchEmailContent.ts before sending.\",\n      );\n    }\n\n    const name =\n      nameSuffix && nameSuffix.length > 0\n        ? `PRO Launch — ${nameSuffix}`\n        : `PRO Launch — ${new Date().toISOString().slice(0, 10)}`;\n\n    const res = await fetch(`${RESEND_API_BASE}/broadcasts`, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n        Authorization: `Bearer ${apiKey}`,\n        \"User-Agent\": USER_AGENT,\n      },\n      body: JSON.stringify({","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/koala73/worldmonitor/blob/eeab0a219fce0f02a00603b532dbae9041b934ac/convex/broadcast/sendBroadcast.ts#L63-L99","documentation":"Error \"[createProLaunchBroadcast] PRO_LAUNCH_PHYSICAL_ADDRESS is still a placeholder (\"${PRO_LAUNCH_PHYSICAL_ADDRESS}\"). Set the real CAN-SPAM postal address in convex/broadcast/proLaunchEmailContent.ts before sending.\" thrown in koala73/worldmonitor.","triggerScenarios":"Thrown at convex/broadcast/sendBroadcast.ts:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Edit PRO_LAUNCH_PHYSICAL_ADDRESS in convex/broadcast/proLaunchEmailContent.ts to the real CAN-SPAM postal address, then regenerate content and retry","Keep a pre-launch checklist item asserting the address is not the placeholder before any broadcast create or send"],"exampleFix":null,"handlingStrategy":"validation","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"}