Skip to content

Better rate-limit error handling #154

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

Open
christroutner opened this issue Jun 19, 2021 · 0 comments
Open

Better rate-limit error handling #154

christroutner opened this issue Jun 19, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@christroutner
Copy link
Contributor

christroutner commented Jun 19, 2021

There are some errors that get thrown by bch-api and thrown by bch-js that do not come through as an Error object.

The scope of this issue is to remain aware of these kinds of error. The solution is to fix the error handling to detect the err.error property, like done in these lines

} catch (err) {
  console.error('Error in transactions.js/get()')

  if (err.error) throw new Error(err.error)
  throw err
}
@christroutner christroutner added the enhancement New feature or request label Jun 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant