(
err: err,
{
docsPath,
...args
}: CallParameters & {
chain?: Chain | undefined
docsPath?: string | undefined
},
)
| 22 | } |
| 23 | |
| 24 | export function getCallError<err extends ErrorType<string>>( |
| 25 | err: err, |
| 26 | { |
| 27 | docsPath, |
| 28 | ...args |
| 29 | }: CallParameters & { |
| 30 | chain?: Chain | undefined |
| 31 | docsPath?: string | undefined |
| 32 | }, |
| 33 | ): GetCallErrorReturnType<err> { |
| 34 | const cause = (() => { |
| 35 | const cause = getNodeError( |
| 36 | err as {} as BaseError, |
| 37 | args as GetNodeErrorParameters, |
| 38 | ) |
| 39 | if (cause instanceof UnknownNodeError) return err as {} as BaseError |
| 40 | return cause |
| 41 | })() |
| 42 | return new CallExecutionError(cause, { |
| 43 | docsPath, |
| 44 | ...args, |
| 45 | }) as GetCallErrorReturnType<err> |
| 46 | } |
no test coverage detected