You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.