Skip to content

Commit f29cb1f

Browse files
authored
Update README.md
1 parent f3f3efe commit f29cb1f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ Sometimes Solana libaries return an error like:
2424
2525
Just:
2626

27-
- Get the errors from your programs `error.rs` file - for example, there are [the errors for the Token Program](https://github.com/solana-labs/solana-program-library/blob/master/token/program/src/error.rs)
27+
- Get the errors from the specific program's `error.rs` file - for example, there are [the errors for the Token Program](https://github.com/solana-labs/solana-program-library/blob/master/token/program/src/error.rs)
2828

2929
- Save the errors into an array
3030

3131
```
3232
// Token program errors
3333
// https://github.com/solana-labs/solana-program-library/blob/master/token/program/src/error.rs
34-
const programErrors = [
34+
const tokenProgramErrors = [
3535
"Lamport balance below rent-exempt threshold",
3636
"Insufficient funds",
3737
"Invalid Mint",
@@ -59,7 +59,7 @@ Then run:
5959

6060
```
6161
const errorMessage = getCustomErrorMessage(
62-
programErrors,
62+
tokenProgramErrors,
6363
"failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x10",
6464
);
6565
```

0 commit comments

Comments
 (0)