MCPcopy
hub / github.com/PostHog/posthog / getJSONOrThrow

Function getJSONOrThrow

frontend/src/lib/api.ts:85–91  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

83}
84
85export async function getJSONOrThrow(response: Response): Promise<any> {
86 try {
87 return await response.json()
88 } catch (e) {
89 return { statusText: response.statusText }
90 }
91}
92
93class ApiRequest {
94 private pathComponents: string[]

Callers 9

insightLogic.tsFile · 0.90
dashboardLogic.tsxFile · 0.90
getFunction · 0.85
getResponseFunction · 0.85
updateFunction · 0.85
createFunction · 0.85
createResponseFunction · 0.85
deleteFunction · 0.85

Calls 1

jsonMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…