{"record":{"id":"f09fadc5bd77d5a4","repo":"antiwork/gumroad","slug":"something-went-wrong","errorCode":null,"errorMessage":"Something went wrong.","messagePattern":"Something went wrong\\.","errorType":"exception","errorClass":"ResponseError","httpStatus":null,"severity":"error","filePath":"app/javascript/data/account.ts","lineNumber":63,"sourceCode":"};\n\ntype AddPurchaseToLibraryResult = { redirectLocation: string };\n\nexport const addPurchaseToLibrary = async (data: {\n  purchaseId: string;\n  purchaseEmail: string;\n}): Promise<AddPurchaseToLibraryResult> => {\n  const response = await request({\n    method: \"POST\",\n    url: Routes.add_purchase_to_library_path({ format: \"json\" }),\n    accept: \"json\",\n    data: { user: { purchase_id: data.purchaseId, purchase_email: data.purchaseEmail } },\n  });\n\n  const responseData = typia.assert<{ success: true; redirect_location: string } | { success: false }>(\n    await response.json(),\n  );\n  if (!responseData.success) throw new ResponseError();\n  return { redirectLocation: responseData.redirect_location };\n};\n","sourceCodeStart":45,"sourceCodeEnd":66,"githubUrl":"https://github.com/antiwork/gumroad/blob/afeacbd394069a1cbf0c6c50ee8e900925050370/app/javascript/data/account.ts#L45-L66","documentation":"Error \"Something went wrong.\" thrown in antiwork/gumroad.","triggerScenarios":"Thrown at app/javascript/data/account.ts:63 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":"afeacbd394069a1cbf0c6c50ee8e900925050370","analyzedAt":"2026-08-21T17:58:52.159Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}