MCPcopy Create free account
hub / github.com/bridge-codes/bridge / isBridgeError

Function isBridgeError

packages/bridge/source/error/index.ts:9–13  ·  view source on GitHub ↗
(object: any)

Source from the content-addressed store, hash-verified

7}
8
9export const isBridgeError = (object: any): object is { error: Error } =>
10 typeof object === 'object' &&
11 typeof object.error === 'object' &&
12 typeof object.error.name === 'string' &&
13 typeof object.error.status === 'number';
14
15export const httpError = <Status extends ErrorStatus, Name extends string, Data>(
16 status: Status,

Callers 1

MiddelwaresHandlerClass · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected