Currently we handle errors, validation/assertion failures, and successes in a variety of different ways. Sometimes we return {result: "Success"}, log + throw error up the stack, and/or {success: false, error: "this failed for some reason"}. I think we could become more consistent about things while using a Result type.
Interesting articles/projects:
https://imhoff.blog/posts/using-results-in-typescript
https://github.com/vultix/ts-results
Currently we handle errors, validation/assertion failures, and successes in a variety of different ways. Sometimes we return
{result: "Success"},log + throw error up the stack, and/or{success: false, error: "this failed for some reason"}. I think we could become more consistent about things while using a Result type.Interesting articles/projects:
https://imhoff.blog/posts/using-results-in-typescript
https://github.com/vultix/ts-results