brave-intl / bat-go

Pass "go", collect 200 BAT
Mozilla Public License 2.0
41 stars 31 forks source link

Propagate error instead of panicking in situ #2568

Open Sneagan opened 3 weeks ago

Sneagan commented 3 weeks ago
          I'd argue that a better way would have been to return a sentinel error, propagate it up, and handle it where appropriate. This happens in an initialising code, and this code is called in `NewService` which already returns an error.

What does stop us from doing that?

_Originally posted by @pavelbrm in https://github.com/brave-intl/bat-go/pull/2563#discussion_r1637550270_