{"record":{"id":"fc399c61e4bee0f6","repo":"different-ai/openwork","slug":"openwork-web-checkout-failed-response-status","errorCode":null,"errorMessage":"OpenWork Web checkout failed (${response.status}).","messagePattern":"OpenWork Web checkout failed \\((.+?)\\)\\.","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ee/apps/den-web/app/(den)/dashboard/web/page.tsx","lineNumber":310,"sourceCode":"    checkoutStartingRef.current = true;\n    setCheckoutBusy(true);\n    setErrorRecord(null);\n    try {\n      await runReauthableAction(\"openwork-web-checkout\", async () => {\n        const { response, payload } = await requestJson(\n          \"/v1/billing/stripe/checkout\",\n          {\n            method: \"POST\",\n            headers: { [ORG_SCOPE_HEADER]: orgId },\n            body: JSON.stringify({ type: OPENWORK_WEB_CHECKOUT_TYPE }),\n          },\n          12000,\n        );\n        if (isExistingWebAccessResponse(response, payload)) {\n          await requestWebBilling(orgId, false);\n          return;\n        }\n        if (!response.ok) throw getRequestError(payload, response, `OpenWork Web checkout failed (${response.status}).`);\n        const url = payload && typeof payload === \"object\" && \"url\" in payload && typeof payload.url === \"string\" ? payload.url : null;\n        if (!url) throw new Error(\"OpenWork Web checkout response did not include a URL.\");\n        if (!mountedRef.current || currentOrgIdRef.current !== orgId) {\n          throw new Error(\"The active organization changed before checkout opened. Please try again.\");\n        }\n        window.location.href = url;\n      });\n    } catch (error) {\n      if (mountedRef.current && currentOrgIdRef.current === orgId) {\n        setErrorRecord({ orgId, message: error instanceof Error ? error.message : \"Could not start OpenWork Web checkout.\" });\n      }\n    } finally {\n      checkoutStartingRef.current = false;\n      if (mountedRef.current) setCheckoutBusy(false);\n    }\n  }\n\n  async function retryBilling() {","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-web/app/(den)/dashboard/web/page.tsx#L292-L328","documentation":"Error \"OpenWork Web checkout failed (${response.status}).\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/apps/den-web/app/(den)/dashboard/web/page.tsx:310 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}