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

Function createORPCErrorFromJson

packages/client/src/error.ts:232–240  ·  view source on GitHub ↗
(
  json: ORPCErrorJSON<TCode, TData>,
  options: ErrorOptions = {},
)

Source from the content-addressed store, hash-verified

230}
231
232export function createORPCErrorFromJson<TCode extends ORPCErrorCode, TData>(
233 json: ORPCErrorJSON<TCode, TData>,
234 options: ErrorOptions = {},
235): ORPCError <TCode, TData> {
236 return new ORPCError(json.code, {
237 ...options,
238 ...json,
239 })
240}

Callers 8

error.test.tsFile · 0.90
deserializeMethod · 0.90
decodeMethod · 0.90
action-form.tsFile · 0.90
useServerActionFunction · 0.90
decodeMethod · 0.90
deserializeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected