# IncompatibleClientError | @aa-sdk/core

> Represents an error thrown when a client is not compatible with the expected client type for a specific method. The error message provides guidance on how to create a compatible client.

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

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

Defined in: [aa-sdk/core/src/errors/client.ts:7](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/errors/client.ts#L7)

Represents an error thrown when a client is not compatible with the expected client type for a specific method. The error message provides guidance on how to create a compatible client.

## Extends

- [`BaseError`](BaseError)

## Constructors

### Constructor

```ts
new IncompatibleClientError(
   expectedClient,
   method,
   client): IncompatibleClientError;
```

Defined in: [aa-sdk/core/src/errors/client.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/errors/client.ts#L17)

Throws an error when the client type does not match the expected client type.

#### Parameters

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

  <tbody>
    <tr>
      <td>
        `expectedClient`
      </td>

      <td>
        `string`
      </td>

      <td>
        The expected type of the client.
      </td>
    </tr>

    <tr>
      <td>
        `method`
      </td>

      <td>
        `string`
      </td>

      <td>
        The method that was called.
      </td>
    </tr>

    <tr>
      <td>
        `client`
      </td>

      <td>
        [`Client`](https://viem.sh)
      </td>

      <td>
        The client instance.
      </td>
    </tr>

  </tbody>
</table>

#### Returns

`IncompatibleClientError`

#### 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>
        `"IncompatibleClientError"`
      </td>
    </tr>

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

      <td>
        `string`
      </td>

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

  </tbody>
</table>