(...rest)
| 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 | }, |
nothing calls this directly
no test coverage detected