> For AI agents: the complete documentation index is available at https://types-mediawiki-response.pages.dev/llms.txt, the full documentation bundle is available at https://types-mediawiki-response.pages.dev/llms-full.txt.

# Interface: ApiError

Defined in: [envelope/index.ts:138](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/envelope/index.ts#L138)

The `error` object under the default (`bc`) `errorformat`.

## Indexable

> \[`key`: `string`]: `unknown`

Structured data attached to the message by the emitting code, merged
into this object as top-level keys.

## Properties

### code

> **code**: `string`

Defined in: [envelope/index.ts:140](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/envelope/index.ts#L140)

Machine-readable error code, e.g. `badtoken`.

***

### docref?

> `optional` **docref?**: `string`

Defined in: [envelope/index.ts:146](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/envelope/index.ts#L146)

Docs link plus deprecation notices; nested in `error` under the `bc` format.

***

### info

> **info**: `string`

Defined in: [envelope/index.ts:143](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/envelope/index.ts#L143)

Human-readable description provided by the server.

***

### trace?

> `optional` **trace?**: `string`

Defined in: [envelope/index.ts:149](https://github.com/BearBin1215/types-mediawiki-response/blob/d354a9c689faf74c19e13b617a83dcdb7a83726f/src/envelope/index.ts#L149)

PHP backtrace, when `$wgShowExceptionDetails` is on (non-usage exceptions).
