google / google/ground-platform
[Code health] Throw exception instead of returning Error on relevant conversion functions
Open
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
Assessment
This issue has not been assessed yet.