Skip to content

Clean TypeScript Result type instead of throwing for the Frontend #670

@zupzup

Description

@zupzup

Come up with a nice Result<T> { success: T?, error: ErrorValue? } type that's returned from the API instead of promises that can throw.

The goal is to never throw, but rather have an error type and a success type.

Also, the ErrorValue should be an enum with all the possible error values for this call - if possible, make this more fine-grained (as fine-grained as possible, with the per-call-errors as the optimal. If it's not possible currently due to the effort, then create a future improvement ticket for this.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions