How does wagmi get a short error message? #2865
the-content
started this conversation in
General
Replies: 2 comments 8 replies
-
|
Try |
Beta Was this translation helpful? Give feedback.
6 replies
-
|
Did you find any solution to get short messages |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How to get the custom thrown error in the contract when reading and writing, for example, in solidity, there is a require(condition, "Insufficient distributable balance"),I want to get the error message in onError in wagmi, but when I get the error A lot of them like the following,I need to get the error message
User rejected the request.,how should I get the short error message?I tried
error.message, and I still get a lot of messages like thiswriteError: TransactionExecutionError: User rejected the request. Request Arguments. from: 0x000...0001 to: 0x000...0002 value: 0 ETH value: 0 ETH 0x095ea7b300000000000000000000000000007392a17feac9a74938834bb486be7e6de6686810ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff Details: MetaMask Tx Signature: User denied transaction signature. Version: viem@1.4.2 at getTransactionError (getTransactionError.js:7:1) at sendTransaction (sendTransaction.js:121:34) at async writeContract (writeContract.js:59:1) at async writeContract (chunk-LAFZBYO7.js:2357:1) ``Beta Was this translation helpful? Give feedback.
All reactions