JustFlows

Documentation is English-only for now. The rest of the site follows your language.

Error pages

Choose what renders for 404, 403, 410, and 429 per class, and how the dependency-free 500 and maintenance-mode pages work underneath them.

6 min read

Theme customize → Error pages lets an administrator choose, per class — 404, 403, 410, 429 — what actually renders: the theme's own template resolution, Justflows' built-in page, or a specific published page. The choice is offered once per translation group, so the matching locale renders automatically for a multilingual site. GET/PUT /api/error-pages.

Template hierarchy

The template hierarchy gains 403, 410, 429, and a shared error fallback slot alongside the existing 404. A theme can ship templates/403.json / 410.json / 429.json / error.json, and a site can override any of them per site through the same draft / publish / reset mechanism 404 already had. See Templates.

What never changes

  • The chosen source never changes the HTTP status — a selected page still answers 403 / 404 / 410 / 429, it cannot 200 a blocked or missing resource.
  • Every error response is sent Cache-Control: private, no-store.
  • A URL whose page was trashed (soft-deleted) now returns a real 410, rather than never having existed, until trash retention expires it into a normal 404.
  • The public site's global and search rate limiters answer 429 with the themed page instead of plain JSON or text.

500 and maintenance mode

500 and a separate maintenance mode (Settings → Site visibility, distinct from "Site is live") always render a static, dependency-free page with an admin-editable heading and message, with no database, cache, or plugin-runtime access — so they still work through a database outage. The pre-boot server.js layer's boot-failure response renders the same branded page and no longer leaks the underlying error message.

Localization

Both the static fallback and the built-in 404 / 403 / 410 / 429 pages are localized from the request — URL prefix, then Accept-Language — across the site's bundled languages.

Careful

Admin-provided heading and message text is sanitized before storage and HTML-escaped at render. Built-in copy never reflects the request path, query, or headers.