# Interface: TRPCErrorShape<TData>

> 

Defined in: [packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts:11](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts#L11)

The error object of an error response: a JSON-RPC code, a message and
any `data` the error formatter adds.

## See

https://trpc.io/docs/rpc#error-response

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TData` *extends* `object` | `object` |

## Properties

### code

> **code**: [`TRPC_ERROR_CODE_NUMBER`](https://trpc.io/docs/typedoc/server/index/type-aliases/TRPC_ERROR_CODE_NUMBER.md)

Defined in: [packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts:12](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts#L12)

***

### data

> **data**: `TData`

Defined in: [packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts:15](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts#L15)

Extra details, such as the tRPC code and HTTP status.

***

### message

> **message**: `string`

Defined in: [packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts:13](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/rpc/envelopes.ts#L13)
