{"record":{"id":"8ee366c78c520a8e","repo":"koala73/worldmonitor","slug":"dodo-checkout-session-session-session-id-has-no","errorCode":null,"errorMessage":"Dodo checkout session ${session.session_id} has no checkout_url","messagePattern":"Dodo checkout session (.+?) has no checkout_url","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"convex/lib/dodo.ts","lineNumber":86,"sourceCode":"    maxRetries: 0,\n    timeout: CHECKOUT_PROVIDER_ATTEMPT_TIMEOUT_MS,\n  };\n}\n\n/**\n * Create one checkout session — exactly one HTTP request (no SDK-internal\n * retries). Throws the SDK's typed APIError on failure (status 429 for rate\n * limits, classified by payments/checkoutRateLimit.ts).\n */\nexport async function createDodoCheckoutSession(\n  payload: CheckoutSessionPayload,\n): Promise<CheckoutSessionResult> {\n  const client = new DodoPayments(buildCheckoutClientOptions(process.env));\n  const session = await client.checkoutSessions.create(payload);\n  if (!session.checkout_url) {\n    // Session created but no redirect URL — surface as a hard (non-429)\n    // failure on the existing error channel rather than returning a dead link.\n    throw new Error(\n      `Dodo checkout session ${session.session_id} has no checkout_url`,\n    );\n  }\n  return { checkout_url: session.checkout_url };\n}\n","sourceCodeStart":68,"sourceCodeEnd":92,"githubUrl":"https://github.com/koala73/worldmonitor/blob/eeab0a219fce0f02a00603b532dbae9041b934ac/convex/lib/dodo.ts#L68-L92","documentation":"Response-shape guard in createDodoCheckoutSession: the Dodo API call succeeded but the returned session has no checkout_url. Without a URL there is nothing to redirect the user to, so the session is unusable — typically an API contract change or an error-shaped body returned with a 200.","triggerScenarios":"Thrown at convex/lib/dodo.ts:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the logged session payload to see what Dodo actually returned (error body vs a renamed field)","If the field was renamed, update the extraction; if Dodo returns error bodies with 200, handle that shape explicitly"],"exampleFix":null,"handlingStrategy":"fallback","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"}