# AccountAddressAsTargetError

> Error class for when an account address is used as target.

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

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

Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L31)

Error class for when an account address is used as target.

## Extends

- [`PermissionBuilderError`](PermissionBuilderError)

## Constructors

### Constructor

```ts
new AccountAddressAsTargetError(permission): AccountAddressAsTargetError;
```

Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/v5.x.x/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L39)

Constructor for initializing an error message indicating that account address is used as target.

#### Parameters

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

  <tbody>
    <tr>
      <td>
        `permission`
      </td>

      <td>
        [`Permission`](../type-aliases/Permission)
      </td>

      <td>
        The permission with account address as target
      </td>
    </tr>

  </tbody>
</table>

#### Returns

`AccountAddressAsTargetError`

#### Overrides

```ts
PermissionBuilderError.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>
        `"PermissionBuilder: AccountAddressAsTargetError"`
      </td>
    </tr>

  </tbody>
</table>