Errors and outages
Plan for failures with honest error pages, maintenance answers, pages that survive failed scripts, stale copies when the server fails and error reports.
- Recommended 6
- Optional 1
Recommended
Make error pages helpful and honest
WEB-220Serve 404 and 500 pages with the right status codes and the site's own navigation. Never show stack traces.
Say when you'll be back
WEB-221During planned maintenance, answer 503 with
Retry-Afterand a clear page. Keep the health check working.Keep working when a script or service fails
WEB-222When a script, a font or another company's service fails at runtime, the page still shows its content and its main actions still work.
Hide buttons that need JavaScript until it runs
WEB-223Never show a button that does nothing. Hide controls that need JavaScript until the script is running, without moving the page.
Serve the last good page when the server fails
WEB-227Let caches keep serving the last good copy of a public page for up to a day when the app fails or times out.
Collect script errors from visitors' browsers
WEB-228Send every uncaught script error and rejected promise from the browser to your own endpoint, and alert when they rise.
Optional
Warn before retiring an address
WEB-226Before you retire an address or API, announce it with
DeprecationandSunsetheaders.
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/errors-and-outages">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.