google / google/ground-platform

[Code health] Throw exception instead of returning Error on relevant conversion functions

Open
#1,915 1 comment 0 reactions 1 assignee Claimed by @rfontanarosa View on GitHub
cloud functions type: code health
Dominant language
TypeScript
Stars
249
Forks
112
Avg merge
10h 7m
Merged PRs (30d)
4

Description

Returning `Error` adds complexity at the call site, whereas exceptions move handling away from the call site. We should instead only return `Error` internally on functions which are intended to be called on multiple items (e.g., via `map()`) and filtered.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.