{"record":{"id":"bac488c522f27ea0","repo":"antiwork/gumroad","slug":"something-went-wrong-bac488","errorCode":null,"errorMessage":"Something went wrong.","messagePattern":"Something went wrong\\.","errorType":"exception","errorClass":"ResponseError","httpStatus":null,"severity":"error","filePath":"app/javascript/data/analytics.ts","lineNumber":37,"sourceCode":"\nexport const fetchAnalyticsDataByReferral = ({\n  startTime,\n  endTime,\n  interval,\n}: {\n  startTime: string;\n  endTime: string;\n  interval?: \"hour\" | undefined;\n}) => {\n  const abort = new AbortController();\n  const response = request({\n    method: \"GET\",\n    accept: \"json\",\n    url: Routes.analytics_data_by_referral_path({ start_time: startTime, end_time: endTime, interval }),\n    abortSignal: abort.signal,\n  })\n    .then((response) => {\n      if (!response.ok) throw new ResponseError();\n      return response.json();\n    })\n    .then((json) => typia.assert<AnalyticsDataByReferral>(json));\n  return { response, abort };\n};\n\n// CountryData values can be int (country total), int[] (breakdown by states in country)\n// or undefined (ex: when country has views but no sales)\nexport type LocationDataValue = number | number[] | undefined;\nexport type LocationData = Record<string, Record<string, LocationDataValue>>;\nexport type AnalyticsDataByState = {\n  by_state: {\n    sales: LocationData;\n    totals: LocationData;\n    views: LocationData;\n  };\n};\n","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/antiwork/gumroad/blob/afeacbd394069a1cbf0c6c50ee8e900925050370/app/javascript/data/analytics.ts#L19-L55","documentation":"Error \"Something went wrong.\" thrown in antiwork/gumroad.","triggerScenarios":"Thrown at app/javascript/data/analytics.ts:37 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"}