> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# JsonRpcError

```ts theme={null}
type JsonRpcError: {
  "error": {
     "code": number;
     "data": any;
     "message": string;
     "shard": Shard;
    };
  "id": number;
};
```

A JSON-RPC error, which are returned on failure from a JSON-RPC server.

## Type declaration

### error

```ts theme={null}
error: {
  "code": number;
  "data": any;
  "message": string;
  "shard": Shard;
};
```

The response error.

### error.code

```ts theme={null}
code: number;
```

### error.data?

```ts theme={null}
optional data: any;
```

### error.message?

```ts theme={null}
optional message: string;
```

### error.shard?

```ts theme={null}
optional shard: Shard;
```

### id

```ts theme={null}
id: number;
```

The response ID to match it to the relevant request.

## Source

[providers/provider-jsonrpc.ts:147](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L147)
