Skip to content

Consider throwing Errors VS existing fallback behavior. #7

Open
@mjpowersjr

Description

Today I realized that in the case of a network error, the library will log the error using console.log, and proceed to return a fallback return value.

I am using the lib to track gas pricing in a server side app, for us error handling would be cleaner if the following changes where considered:

  1. Remove the console.log statements
  2. Instead of returning a fallback value, allow any Error to bubble up to be handled downstream.

p.s. Overall this library seems to do a great job of tracking gas prices out of the box, thanks!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions