koala73/worldmonitor · error · Error
Dodo checkout session
Error message
Dodo checkout session ${session.session_id} has no checkout_url What it means
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.
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at convex/lib/dodo.ts:86 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/8ee366c78c520a8e.
Report an issue: GitHub.
Appendix: source
Thrown at convex/lib/dodo.ts:86
maxRetries: 0,
timeout: CHECKOUT_PROVIDER_ATTEMPT_TIMEOUT_MS,
};
}
/**
* Create one checkout session — exactly one HTTP request (no SDK-internal
* retries). Throws the SDK's typed APIError on failure (status 429 for rate
* limits, classified by payments/checkoutRateLimit.ts).
*/
export async function createDodoCheckoutSession(
payload: CheckoutSessionPayload,
): Promise<CheckoutSessionResult> {
const client = new DodoPayments(buildCheckoutClientOptions(process.env));
const session = await client.checkoutSessions.create(payload);
if (!session.checkout_url) {
// Session created but no redirect URL — surface as a hard (non-429)
// failure on the existing error channel rather than returning a dead link.
throw new Error(
`Dodo checkout session ${session.session_id} has no checkout_url`,
);
}
return { checkout_url: session.checkout_url };
}
View on GitHub (pinned to eeab0a219f)