* Adds type-safe custom errors to the contract. * The provided errors are spared-merged with any existing errors in the contract. * * @see https://orpc.dev/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs
(
errors: U,
)
| 94 | * @see {@link https://orpc.dev/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs} |
| 95 | */ |
| 96 | errors<U extends ErrorMap>( |
| 97 | errors: U, |
| 98 | ): ContractBuilder<TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta> { |
| 99 | return new ContractBuilder({ |
| 100 | ...this['~orpc'], |
| 101 | errorMap: mergeErrorMap(this['~orpc'].errorMap, errors), |
| 102 | }) |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Sets or updates the metadata for the contract. |
nothing calls this directly
no test coverage detected