# CanisterErrorDetails

> **CanisterErrorDetails**\<`E`\> = \[`E`\] *extends* \[`never`\] ? `undefined` : `E` *extends* `object` ? `D` : `E` *extends* `object` ? `D` \| `undefined` : `E` *extends* `string` \| `number` \| `bigint` \| `boolean` \| `symbol` \| `object` \| `null` \| `undefined` ? `undefined` : `unknown`

Defined in: [core/src/errors/index.ts:147](https://github.com/B3Pay/ic-reactor/blob/f1956947ae037304fce1675a38695964c1aa9e32/packages/core/src/errors/index.ts#L147)

The type of [CanisterError.details](https://ic-reactor.b3pay.net/v3/libs/classes/canistererror/#details) for an error value of type `E`.

The constructor copies the `details` field of an error value that has a text
`code` exactly as it is, and leaves `details` undefined for anything else.
So this is that field's own type, decoded like the rest of the error, or
`undefined`. Candid decoding never produces a `Map`: Orbit's
`record { code : text; message : opt text; details : opt vec record { text; text } }`
gives `[] | [Array<[string, string]>]` through a `Reactor` and
`Record<string, string> | null | undefined` through a `DisplayReactor`. A
variant error such as ICRC-1's `TransferError`, or any other value without a
text `code`, gives `undefined`. A value of unknown type, or a record with a
text `code` and no `details` field, gives `unknown`.

## Type Parameters

### E

`E`