chatwoot/public
Sojan Jose b2cb3717e5
fix: Replace default Rails error pages with custom designs (#13514)
## Summary

- Replace generic Rails 404, 422, and 500 error pages with
custom-designed pages
- Each page features a prominent gradient error code, clean typography,
and a "Back to home" CTA
- Full dark mode support via `prefers-color-scheme` media query  
- Mobile responsive design  
- No external dependencies (self-contained static HTML, works even when
Rails is down)
- No logo/branding to ensure compatibility with custom-branded
self-hosted instances

---

## Before (default Rails 404)

<img width="2400" height="1998" alt="old-404"
src="https://github.com/user-attachments/assets/c5f044c4-aab6-40e9-aa11-6096ed9d2b42"
/>

---

## After

### Light mode

| 404 | 422 | 500 |
|-----|-----|-----|
| <img width="600" alt="new-404-light"
src="https://github.com/user-attachments/assets/1826c812-0eb9-4219-bdd2-026c54b53123"
/> | <img width="600" alt="new-422-light"
src="https://github.com/user-attachments/assets/d72ffdbf-b61e-4f53-a16b-4ee81103124f"
/> | <img width="600" alt="new-500-light"
src="https://github.com/user-attachments/assets/81bbdb24-bfe7-43a1-b584-f37f71e3bded"
/> |

---

### Dark mode

| 404 | 422 | 500 |
|-----|-----|-----|
| <img width="600" alt="new-404-dark"
src="https://github.com/user-attachments/assets/bd323915-bfb9-48c1-885d-96ff263b4ae0"
/> | <img width="600" alt="new-422-dark"
src="https://github.com/user-attachments/assets/dcb08eca-aee5-4e36-9690-f44da13e8d88"
/> | <img width="600" alt="new-500-dark"
src="https://github.com/user-attachments/assets/538c3c2c-b9dc-406c-9932-ff8897b64790"
/> |

---

## Test plan

Easier way to verify:

- [ ] Visit `/404.html` directly to verify the 404 page  
- [ ] Visit `/422.html` directly to verify the 422 page  
- [ ] Visit `/500.html` directly to verify the 500 page  

Full verification:

- [ ] Visit a non-existent route in production mode to verify the 404
page
- [ ] Trigger a 422 error (e.g., invalid CSRF token) to verify the 422
page
- [ ] Trigger a 500 error to verify the 500 page  
- [ ] Toggle system dark mode and verify all pages render correctly  
- [ ] Test on mobile viewport widths
2026-02-11 07:57:00 -08:00
..
assets feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
audio feat(ce): Add Year in review feature (#13078) 2025-12-15 17:24:45 -08:00
brand-assets chore: Improve signup flow, reduce the number of inputs (#13350) 2026-01-22 18:47:42 -08:00
dashboard/images feat: notion OAuth setup (#11765) 2025-06-26 19:16:06 +05:30
downloads feat: Add ability to bulk import contacts (#3026) 2021-09-29 12:01:58 +05:30
integrations feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
404.html fix: Replace default Rails error pages with custom designs (#13514) 2026-02-11 07:57:00 -08:00
422.html fix: Replace default Rails error pages with custom designs (#13514) 2026-02-11 07:57:00 -08:00
500.html fix: Replace default Rails error pages with custom designs (#13514) 2026-02-11 07:57:00 -08:00
android-icon-36x36.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
android-icon-48x48.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
android-icon-72x72.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
android-icon-96x96.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
android-icon-144x144.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
android-icon-192x192.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-icon-57x57.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-icon-60x60.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-icon-72x72.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-icon-76x76.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-icon-114x114.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-icon-120x120.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-icon-144x144.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-icon-152x152.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-icon-180x180.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-icon-precomposed.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-icon.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
apple-touch-icon-precomposed.png Initial Commit 2019-08-14 15:18:44 +05:30
apple-touch-icon.png Initial Commit 2019-08-14 15:18:44 +05:30
browserconfig.xml [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
favicon-16x16.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
favicon-32x32.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
favicon-96x96.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
favicon-512x512.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
favicon-badge-16x16.png Fix: Adds favicon badge for notification alert. (#2079) 2021-04-13 19:25:19 +05:30
favicon-badge-32x32.png Fix: Adds favicon badge for notification alert. (#2079) 2021-04-13 19:25:19 +05:30
favicon-badge-96x96.png Fix: Adds favicon badge for notification alert. (#2079) 2021-04-13 19:25:19 +05:30
manifest.json [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
ms-icon-70x70.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
ms-icon-144x144.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
ms-icon-150x150.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
ms-icon-310x310.png [Feature] Add PWA support (#157) 2019-10-18 12:37:09 +05:30
robots.txt chore: Block Search bots from rendering widget (#1331) 2020-10-10 11:48:31 +05:30
sw.js Feature: Add web push notification permission in frontend (#766) 2020-05-06 00:10:56 +05:30