How to Test Error States in Your Frontend App
The happy path gets tested every time someone opens the app. The error paths get tested when production breaks. That is backwards: an error screen is the one screen a user sees when they are already frustrated, and it is usually the least reviewed code in the project. The reason is simple: errors are hard to produce on demand. The backend works, so you cannot see what happens when it does not.
This guide lists the failures worth testing, what a good UI does for each, and how to produce every one of them in the browser without changing a line of backend code.