# ServerError

> Error class representing a "Server Error" error, typically thrown when a server request fails.

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

Defined in: [packages/common/src/errors/ServerError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/common/src/errors/ServerError.ts#L6)

Error class representing a "Server Error" error, typically thrown when a server request fails.

## Extends

- [`BaseError`](BaseError)

## Constructors

### Constructor

```ts
new ServerError(
   message,
   status,
   cause?): ServerError;
```

Defined in: [packages/common/src/errors/ServerError.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/common/src/errors/ServerError.ts#L16)

Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client.

#### Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `message`
      </td>

      <td>
        `string`
      </td>

      <td>
        The error message.
      </td>
    </tr>

    <tr>
      <td>
        `status`
      </td>

      <td>
        `number`
      </td>

      <td>
        The HTTP status code of the error.
      </td>
    </tr>

    <tr>
      <td>
        `cause?`
      </td>

      <td>
        `Error`
      </td>

      <td>
        The cause of the error.
      </td>
    </tr>

  </tbody>
</table>

#### Returns

`ServerError`

#### Overrides

[`BaseError`](BaseError).[`constructor`](BaseError#constructor)

## Properties

<table>
  <thead>
    <tr>
      <th align="left">Property</th>
      <th align="left">Type</th>
      <th align="left">Default value</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <a id="name" /> `name`
      </td>

      <td>
        `string`
      </td>

      <td>
        `"ServerError"`
      </td>
    </tr>

    <tr>
      <td>
        <a id="version" /> `version`
      </td>

      <td>
        `string`
      </td>

      <td>
        `VERSION`
      </td>
    </tr>

  </tbody>
</table>