-
Notifications
You must be signed in to change notification settings - Fork 483
Open
Description
Describe the bug and the steps to reproduce it
When an on-chain transaction fails (e.g., user rejects the transaction, insufficient funds, or a revert occurs), OnchainKit does not always return a consistent, structured error object to the caller. In some cases, the error is only logged to the console or returned in a non-descriptive form that lacks clear error codes or context, making programmatic handling and UI feedback difficult.
Steps to reproduce:
- Integrate OnchainKit in a project with a transaction submission flow.
- Connect a wallet using the provided wallet components.
- Trigger a transaction that is expected to fail (e.g., send with insufficient balance or cause a revert).
- Inspect the error seen in the app code (e.g., via
try/catchor error handler). - Notice that the error is generic or lacks structured details.
What's the expected behavior?
OnchainKit should consistently return structured, descriptive errors for all transaction failure cases. Errors should include meaningful fields such as error type, failure reason, and relevant context so that applications can handle them programmatically and provide appropriate feedback to users.
What version of the libraries are you using?
No response
Metadata
Metadata
Assignees
Labels
No labels