JavaScript error handling is a mess. You either throw exceptions that are invisible in type signatures, or return null | T and forget to check, or build your own { ok: boolean, data: T, error: E } shape — inconsistently, every time.
Rust has a bette...