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 * at `error`.
74 */
75const isClientApiError = (error: unknown): boolean =>
76 error instanceof ApiError &&
77 error.statusCode >= 400 &&
78 error.statusCode < 500;
79
80/*
81 * Resolve the final HTTP status BEFORE the log line so observability

Callers 1

errorHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected