MCPcopy Create free account
hub / github.com/TanStack/ai / jsonError

Function jsonError

examples/ts-react-chat/src/routes/api.generate.speech.ts:21–26  ·  view source on GitHub ↗
(status: number, payload: Record<string, unknown>)

Source from the content-addressed store, hash-verified

19})
20
21function jsonError(status: number, payload: Record<string, unknown>) {
22 return new Response(JSON.stringify(payload), {
23 status,
24 headers: { 'content-type': 'application/json' },
25 })
26}
27
28export const Route = createFileRoute('/api/generate/speech')({
29 server: {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected