* Check if the given code is a valid JSON-RPC server error code. * * @param code - The error code. * @returns Whether the given code is a valid JSON-RPC server error code.
(code: number)
| 193 | * @returns Whether the given code is a valid JSON-RPC server error code. |
| 194 | */ |
| 195 | function isJsonRpcServerError(code: number): boolean { |
| 196 | return code >= -32099 && code <= -32000; |
| 197 | } |
| 198 | |
| 199 | /** |
| 200 | * Serializes an unknown error to be used as the `cause` in a fallback error. |
no outgoing calls
no test coverage detected
searching dependent graphs…