# AbiError.format

Formats an [`AbiError.AbiError`](/api/AbiError/types#abierror) into a **Human Readable ABI Error**.

## Imports

:::code-group
```ts [Named]
import { AbiError } from 'ox'
```

```ts [Entrypoint]
import * as AbiError from 'ox/AbiError'
```
:::

## Examples

```ts twoslash
import { AbiError } from 'ox'

const formatted = AbiError.format({
  type: 'error',
  name: 'Example',
  inputs: [
    {
      name: 'spender',
      type: 'address'
    },
    {
      name: 'amount',
      type: 'uint256'
    }
  ]
})

formatted
//    ^?
```

## Definition

```ts
function format<abiError>(
  abiError: abiError | AbiError,
): format.ReturnType<abiError>
```

**Source:** [src/core/AbiError.ts](https://github.com/wevm/ox/blob/main/src/core/AbiError.ts#L837)

## Parameters

### abiError

* **Type:** `abiError | AbiError`

The ABI Error to format.

## Return Type

The formatted ABI Error.

`format.ReturnType<abiError>`
