CanisterErrorDetails
CanisterErrorDetails<
E> = [E] extends [never] ?undefined:Eextendsobject?D:Eextendsobject?D|undefined:Eextendsstring|number|bigint|boolean|symbol|object|null|undefined?undefined:unknown
Defined in: core/src/errors/index.ts:147
The type of 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
Section titled “Type Parameters”E