> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layerzero.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Debugging LayerZero Errors

> Debug and decode LayerZero custom errors using CLI tools. List protocol errors and decode error selectors for faster troubleshooting. Step-by-step instructio...

The LayerZero sample project provides powerful tools for listing and decoding custom errors from the protocol and your OApp.

Using the CLI tool, you can identify errors at the protocol level, debug, and resolve issues quickly during development and deployment.

### Commands

To list all the custom errors defined in the LayerZero protocol and your project, run:

```bash wrap theme={null}
npx hardhat lz:errors:list
```

To decode custom error data based on the error selector, run:

```bash wrap theme={null}
npx hardhat lz:errors:decode <error selector>
```

The output will provide information about the custom error name, which you can compare against the error list.
