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

Function item

packages/server/src/error.ts:30–41  ·  view source on GitHub ↗
(...rest)

Source from the content-addressed store, hash-verified

28 }
29
30 const item: ORPCErrorConstructorMapItem<string, unknown> = (...rest) => {
31 const options = resolveMaybeOptionalOptions(rest)
32 const config = errors[code]
33
34 return new ORPCError(code, {
35 defined: Boolean(config),
36 status: config?.status,
37 message: options.message ?? config?.message,
38 data: options.data,
39 cause: options.cause,
40 })
41 }
42
43 return item
44 },

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected