MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / isClientApiError

Function isClientApiError

apps/api/src/middleware/error-handler.ts:75–78  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

73 code === ElysiaErrorCodes.PARSE ||
74 code === ElysiaErrorCodes.INVALID_COOKIE_SIGNATURE;
75
76/*
77 * Application-thrown `ApiError`s carry their own statusCode and reach
78 * this handler before Elysia gets to tag them with an error code. Any
79 * 4xx from the app layer is by definition client-driven (bad input,
80 * missing auth, forbidden, conflict): log at `warn` so it doesn't
81 * pollute the error stream alongside genuine 5xx bugs. 5xx still logs

Callers 1

errorHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected