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

Function apiError

packages/ai-sandbox-vercel/tests/vercel.test.ts:12–16  ·  view source on GitHub ↗
(status: number, body?: unknown, message = '')

Source from the content-addressed store, hash-verified

10// as success while still surfacing real failures.
11describe('isDirAlreadyExistsError', () => {
12 const apiError = (status: number, body?: unknown, message = '') =>
13 new APIError(new Response(null, { status }), {
14 message,
15 json: body,
16 })
17
18 it('matches a 400 with an EEXIST-style message in the json body', () => {
19 const err = apiError(400, {

Callers 1

vercel.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected