MCPcopy Index your code
hub / github.com/simstudioai/sim / parseConvexResponse

Function parseConvexResponse

apps/sim/tools/convex/utils.ts:71–79  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

69 * from an invalid deploy key) as descriptive errors instead of empty results.
70 */
71export async function parseConvexResponse(response: Response): Promise<unknown> {
72 if (!response.ok) {
73 const text = await response.text().catch(() => '')
74 throw new Error(
75 `Convex request failed (HTTP ${response.status})${text ? `: ${truncate(text.trim(), 300)}` : ''}`
76 )
77 }
78 return response.json()
79}
80
81/**
82 * Transforms a Convex function-call response. Convex returns HTTP 200 with an

Callers 4

list_tables.tsFile · 0.90
list_documents.tsFile · 0.90
document_deltas.tsFile · 0.90

Calls 2

truncateFunction · 0.90
textMethod · 0.80

Tested by

no test coverage detected