4 votes1 answer287 views
How should I model an API result so every error case is exhaustively handled?
My current response type uses several optional properties, so impossible states compile. Code example I want the UI to require separate handling for success, validation failure, authentication failure, and an unexpected server error.
Code example
posted by Lina Park