1
Step 5 When the API fails
Tirsvad edited this page 2026-11-22 12:43:04 +01:00

English · Dansk · Bahasa Malaysia

Step 5: When the API fails

What this step is

A visitor should get a clear message when the API is down, not a stack trace.

What was done

Network errors, timeouts and bad JSON all become one ApiUnavailableError. The website maps it to a friendly page with status 503.

What was gained

One domain error for every failure keeps the presentation layer simple. Failure is a normal case to test, not an exception to ignore.

Screenshot

Step 5: When the API fails