-
Notifications
You must be signed in to change notification settings - Fork 1
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
What does this? #14
Comments
Works, because the data return this...
|
I think you misunderstood what I meant 😅 In axios, when a call returns a 404 status code, it directly throws an error stopping the application completely, for example, the following code: const not_exist = await walletfy.getBalance('btc', 'not_exist')
console.log(not_exist) would throw the following in the console:
This type of errors should be handled internally in the library and return something more descriptive to the user. I did something for it in the sumcoin implementation, following what was mentioned in Pull request #4 const not_exist = await walletfy.getBalance('sum', 'not_exist')
console.log(not_exist) returns the following in the console:
|
Right, I saw the same error when you put an address that does not exist, the ideal is to do as you have mentioned |
I understand that axios with the status 404 directly throws an error, so the check does not work, right?
The text was updated successfully, but these errors were encountered: