{"record":{"id":"26f80bd1ad31d67a","repo":"antiwork/gumroad","slug":"something-went-wrong-26f80b","errorCode":null,"errorMessage":"Something went wrong.","messagePattern":"Something went wrong\\.","errorType":"exception","errorClass":"ResponseError","httpStatus":null,"severity":"error","filePath":"app/javascript/data/affiliated_products.ts","lineNumber":20,"sourceCode":"\nimport { AbortError, request, ResponseError } from \"$app/utils/request\";\n\nimport { AffiliatedProduct, AffiliatedPageStats, SortKey } from \"$app/components/AffiliatedPage\";\nimport { PaginationProps } from \"$app/components/Pagination\";\nimport { Sort } from \"$app/components/useSortingTableDriver\";\n\ntype PagedAffiliatedProductsData = {\n  affiliated_products: AffiliatedProduct[];\n  pagination: PaginationProps;\n};\n\n// An abort landing after fetch resolved but before the body finished reading rejects with the\n// platform DOMException, outside request()'s conversion boundary. Callers only recognize the app's\n// own AbortError, so an unconverted one escapes their cancellation branch and strands the loader.\nconst convertPlatformAbort = (e: unknown): never => {\n  if (e instanceof DOMException && e.name === \"AbortError\") throw new AbortError();\n  if (e instanceof AbortError || e instanceof ResponseError) throw e;\n  throw new ResponseError();\n};\n\nexport const getPagedAffiliatedProducts = (page?: number, query?: string, sort?: Sort<SortKey> | null) => {\n  const abort = new AbortController();\n  const response = request({\n    method: \"GET\",\n    accept: \"json\",\n    url: Routes.products_affiliated_index_path({ page, query, sort }),\n    abortSignal: abort.signal,\n  })\n    .then((res) => res.json().catch(convertPlatformAbort))\n    .then((json) => typia.assert<PagedAffiliatedProductsData>(json));\n\n  return {\n    response,\n    cancel: () => abort.abort(),\n  };\n};","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/antiwork/gumroad/blob/afeacbd394069a1cbf0c6c50ee8e900925050370/app/javascript/data/affiliated_products.ts#L2-L38","documentation":"Error \"Something went wrong.\" thrown in antiwork/gumroad.","triggerScenarios":"Thrown at app/javascript/data/affiliated_products.ts:20 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"}