> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# AbiError.format

:::info
`AbiError.format` is a re-export of ox's [`AbiError.format`](https://oxlib.sh/api/AbiError/format). Refer to the ox documentation for the full reference.
:::

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

## Imports

```ts
import { AbiError } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { AbiError } from 'viem/utils'

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>
```

## Parameters

### abiError

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

The ABI Error to format.

## Return Type

The formatted ABI Error.

`format.ReturnType<abiError>`
