Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(sdk): Make the "error handler" give more information #777

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Chirag-S-Kotian
Copy link

@Chirag-S-Kotian Chirag-S-Kotian commented Oct 23, 2024

What does this PR do?

This PR refactors the error handling mechanism in the SDK to handle various error scenarios more effectively. It improves the clarity and specificity of error messages returned when a transaction fails, especially when dealing with contract function revert errors.

Related ticket

Fixes #769

Type of change

  • Chore
  • Bug fix
  • New feature
  • Documentation update

Check list

  • Unit tests for any smart contract change
  • Contracts and functions are documented

@alainncls alainncls changed the title Refactor Error Handler for Improved Error Messaging chore(sdk): Make the "error handler" give more information Oct 23, 2024
sdk/src/utils/errorHandler.ts Outdated Show resolved Hide resolved
sdk/src/utils/errorHandler.ts Outdated Show resolved Hide resolved
@alainncls
Copy link
Collaborator

@Chirag-S-Kotian there seems to be an issue with the unit tests, I'll look at them once they're fixed, ok?
I've added 2 small comments on the implementation itself 🙂

@Chirag-S-Kotian
Copy link
Author

Okay I will implement that and if there is an error in unit test please let me know.
Thank you 🙏😊.

@Chirag-S-Kotian
Copy link
Author

hy @alainncls help me to run the tests locally using pnpm ,tell me the exact command to test the errorhandler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Make the "error handler" give more information
2 participants