# ReactorErrorOf

> **ReactorErrorOf**\<`R`, `M`\> = [`ReactorReturnErr`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/reactorreturnerr/)\<[`ServiceOf`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/serviceof/)\<`R`\>, `M`, [`TransformOf`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/transformof/)\<`R`\>\>

Defined in: [core/src/types/reactor.ts:377](https://github.com/B3Pay/ic-reactor/blob/f1956947ae037304fce1675a38695964c1aa9e32/packages/core/src/types/reactor.ts#L377)

The errors a call of a reactor's method rejects with: a `CanisterError`
holding the `Err` value of its Candid `Result` in the reactor's own form, a
`CallError` or a `ValidationError`. It is
`ReactorReturnErr<Service, M, Transform>` with the service and transform
read from `typeof reactor`, and the type a hook's `error` holds.

## Type Parameters

### R

`R` *extends* `object`

The reactor's type, as `typeof reactor`.

### M

`M` *extends* [`FunctionName`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/functionname/)\<[`ServiceOf`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/serviceof/)\<`R`\>\>

The method.

## Example

```typescript
const ledger = new DisplayReactor<Ledger>({ clientManager, name: "ledger", idlFactory })

type TransferError = ReactorErrorOf<typeof ledger, "icrc1_transfer">

function describe(error: TransferError): string {
  if (isCanisterError(error)) return error.code // "InsufficientFunds", ...
  return error.message
}
```