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

Error messages determination and handling #508

Closed
mykhailohordin opened this issue Apr 29, 2024 · 3 comments
Closed

Error messages determination and handling #508

mykhailohordin opened this issue Apr 29, 2024 · 3 comments

Comments

@mykhailohordin
Copy link

mykhailohordin commented Apr 29, 2024

Tronweb Version: "5.1.1"
Node Version: "20.11"

Since GreatVoyage-v4.7.3(Chilon) of tronprotocol/java-tron with PR#5426 was released I have faced a problem with the error handling, because some of providers didn`t update the version of tronprotocol/java-tron on the nodes.

For example:

Provider#1 will throw such kind of error:
frozenBalance must be more than 1TRX - Before GreatVoyage-v4.7.3(Chilon)
While Provider#2 will throw at the same time:
frozenBalance must be greater than or equal to 1 TRX - After GreatVoyage-v4.7.3(Chilon)

Question#1: Is there any plan to handle such kind of errors and redetermine them to one fixed representation.
Question#2: Is there any plan to include possible error messages as an enum inside TypeScript version of TronWeb. It would be great because developers could expect what kind of errors they, possibly, would catch.

Details of the PR#5426 issue.

@DmytroShalaiev
Copy link

I have the same thoughts, it will be cool to keep a list of errors in tronWeb and sync it with tron-node on updates.

@start940315
Copy link
Contributor

As we know, the java-tron API interface currently has various error codes, some of which will change with version iterations. TronWeb has no plans to support these in the near future, but we will take this as an enhancement in the future. It is currently recommended that you handle it yourself. If you have any questions, please feel free to contact us.

@DmytroShalaiev
Copy link

Thanks for reply, I think it will nice for the future integrations and UX

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

No branches or pull requests

4 participants