MCPcopy Create free account
hub / github.com/middleapi/orpc / fallbackORPCErrorStatus

Function fallbackORPCErrorStatus

packages/client/src/error.ts:89–91  ·  view source on GitHub ↗
(code: ORPCErrorCode, status: number | undefined)

Source from the content-addressed store, hash-verified

87export type ORPCErrorCode = CommonORPCErrorCode | (string & {})
88
89export function fallbackORPCErrorStatus(code: ORPCErrorCode, status: number | undefined): number {
90 return status ?? (COMMON_ORPC_ERROR_DEFS as any)[code]?.status ?? 500
91}
92
93export function fallbackORPCErrorMessage(code: ORPCErrorCode, message: string | undefined): string {
94 return message || (COMMON_ORPC_ERROR_DEFS as any)[code]?.message || code

Callers 4

error.test.tsFile · 0.90
validateORPCErrorFunction · 0.90
#errorResponseMethod · 0.90
constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected