News for hackers. Stuff that matters.
Re:A better way to handle errors in JavaScript by golergka on Tuesday October 31, 2023 @05:01PM (#38091315)
Because errors have different semantics. Some should kill your whole app and propagate up to the top layer, where a transaction that wraps the whole http request will be cancelled, or a error screen will be shown to the user. But other errors are part of business as usual — they should be handled explicitly, and type system should force you to do it and match the right exception type.

Personally though I would go with fp-ts.

There are no comments on this comment yet.