Sort the error shape
Choose Option, Result, exception, or log-only handling from the caller's required behavior.
Choose the error shape that fits each condition. Option Result Exception Log-only A user profile has no avatar and the UI can show initials instead Absence is expected and the caller does not need a failure reason to continue. A signup email is invalid and the UI must show an inline correction The caller needs a domain reason it can turn into a specific correction message. The database connection pool is unavailable during checkout Infrastructure failure is outside normal domain control flow and should not look like user input. A cache hit metric fails to emit but the request can…
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in