# IndexerFormattedError

> For the complete documentation index, see [llms.txt](https://docs.midnight.network/llms.txt)

[**Midnight.js API Reference v4.1.0**](https://docs.midnight.network/api-reference/midnight-js.md)

***

[Midnight.js API Reference](https://docs.midnight.network/api-reference/midnight-js/packages.md) / [@midnight-ntwrk/midnight-js-indexer-public-data-provider](https://docs.midnight.network/api-reference/midnight-js/@midnight-ntwrk/midnight-js-indexer-public-data-provider.md) / IndexerFormattedError

# Class: IndexerFormattedError

Raised when a GraphQL response includes one or more `GraphQLFormattedError` entries. Aggregates all server-side errors into a single numbered message and exposes the original array via [errors](#errors).

The field is named `errors` (not `cause`) because the standard ES2022 `Error.cause` slot is contractually a single underlying error, not a peer collection. Reusing `cause` would confuse Node's `util.inspect` causal chain, Sentry, and other structured loggers.

Transport-level and other Apollo failures are reported via [IndexerQueryError](https://docs.midnight.network/api-reference/midnight-js/@midnight-ntwrk/midnight-js-indexer-public-data-provider/classes/IndexerQueryError.md).

## Extends[​](#extends "Direct link to Extends")

* [`IndexerError`](https://docs.midnight.network/api-reference/midnight-js/@midnight-ntwrk/midnight-js-indexer-public-data-provider/classes/IndexerError.md)

## Constructors[​](#constructors "Direct link to Constructors")

### Constructor[​](#constructor "Direct link to Constructor")

> **new IndexerFormattedError**(`errors`): `IndexerFormattedError`

#### Parameters[​](#parameters "Direct link to Parameters")

##### errors[​](#errors "Direct link to errors")

readonly `GraphQLFormattedError`\[]

The GraphQL errors reported by the server.

#### Returns[​](#returns "Direct link to Returns")

`IndexerFormattedError`

#### Overrides[​](#overrides "Direct link to Overrides")

[`IndexerError`](https://docs.midnight.network/api-reference/midnight-js/@midnight-ntwrk/midnight-js-indexer-public-data-provider/classes/IndexerError.md).[`constructor`](https://docs.midnight.network/api-reference/midnight-js/@midnight-ntwrk/midnight-js-indexer-public-data-provider/classes/IndexerError.md#constructor)

## Properties[​](#properties "Direct link to Properties")

### errors[​](#errors-1 "Direct link to errors")

> `readonly` **errors**: readonly `GraphQLFormattedError`\[]

The GraphQL errors reported by the server.
