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

Function jsonError

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

Source from the content-addressed store, hash-verified

25})
26
27function jsonError(status: number, payload: Record<string, unknown>) {
28 return new Response(JSON.stringify(payload), {
29 status,
30 headers: { 'content-type': 'application/json' },
31 })
32}
33
34export const Route = createFileRoute('/api/generate/audio')({
35 server: {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected