Skip to content

Better rate-limit error handling #154

@christroutner

Description

@christroutner

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions