# IrtError: message property

> The message read-only property of the IrtError interface describes the error for developers.

The **`message`** read-only property of the [`IrtError`](/docs/client/irt-error) interface describes the error for developers. It's inherited from `Error`.

## Value

A string, such as `call buy got no reply within 10000 ms` or `the room kicked this connection (spamming chat)`, with the router's or the room's [`reason`](/docs/client/irt-error/reason) in it where there is one.

## Description

`message` is for logs and for developers. Its wording isn't part of the API, so branch on [`name`](/docs/client/irt-error/name) and [`code`](/docs/client/irt-error/code), never on `message`. To show a player why something failed, show `reason`, or a sentence of the game's own for the `name` or `code`.

[Errors and close codes](/docs/client/errors) lists the messages that [`connect()`](/docs/client/connect), calls and the room-wide requests reject with.

## Examples

### Logging a dropped connection

The game logs why its connection ended, and shows the player a sentence of its own.

```ts
// log-close.ts
import type { ReadyRoomClient } from "@irtio/client";

export function logClose(room: ReadyRoomClient) {
  room.addEventListener("close", ({ error }) => {
    if (!error) return;
    console.error(`Connection to ${room.id} ended: ${error.message}`);
    document.querySelector("#status")!.textContent = "You've been disconnected.";
  });
}
```

## See also

- [`IrtError.reason`](/docs/client/irt-error/reason)
- [Errors and close codes](/docs/client/errors)
