Skip to content

Commit

Permalink
added an example
Browse files Browse the repository at this point in the history
  • Loading branch information
joepegler committed Mar 22, 2024
1 parent 2af5e54 commit ac60099
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Your contributions are vital to keeping this repository valuable and up-to-date.
1. **Submit a Pull Request (PR)**: Submit a PR to the main repository for review.
2. **Edit the JSON directly** [here](https://github.com/bcnmy/aa-errors/edit/main/docs/errors.json) (be careful!).

**NB: The 'regex' field is used to match a thrown error from the SDK to your KnownError, so please make sure it is a string unique to your error**

#### Error Documentation Structure

```typescript
Expand All @@ -27,4 +29,20 @@ export type KnownError = {
};
```

#### Example:

```
{
"name": "SmartAccountInsufficientFundsError",
"regex": "aa21",
"description": "You are not using a paymaster, and the sender address did not have enough native tokens to cover the gas costs associated with the user operation.",
"causes": ["Your smart wallet does not have funds to send transaction."],
"solutions": [
"If you are not using a paymaster, verify that the sender address has enough native tokens to cover the required prefund.",
"Send some native tokens in your smart wallet to be able to resolve the error.",
"If you are looking to use a paymaster to cover the gas fees, verify that the paymasterAndData field is set."
]
}
```

### [Hosted errors](https://bcnmy.github.io/aa-errors/errors.json)

0 comments on commit ac60099

Please sign in to comment.