From e75f58bf69ae61af68911a41d6a36f40785297ae Mon Sep 17 00:00:00 2001
From: adrian adewunmi
Date: Wed, 22 Apr 2026 15:57:15 +0100
Subject: [PATCH 1/3] refactor(core): align error view handling with current UI
surface
---
core/error_views.py | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 core/error_views.py
diff --git a/core/error_views.py b/core/error_views.py
new file mode 100644
index 0000000..081b88b
--- /dev/null
+++ b/core/error_views.py
@@ -0,0 +1,22 @@
+# path: core/error_views.py
+"""Custom error handlers for ReturnHub."""
+
+from __future__ import annotations
+
+from django.http import HttpRequest, HttpResponse
+from django.shortcuts import render
+
+
+def error_403(request: HttpRequest, exception: Exception) -> HttpResponse:
+ """Render the branded forbidden page."""
+ return render(request, "errors/403.html", status=403)
+
+
+def error_404(request: HttpRequest, exception: Exception) -> HttpResponse:
+ """Render the branded not-found page."""
+ return render(request, "errors/404.html", status=404)
+
+
+def error_500(request: HttpRequest) -> HttpResponse:
+ """Render the branded server-error page."""
+ return render(request, "errors/500.html", status=500)
\ No newline at end of file
From b097b4d8ac46b4502de41aee91e700515fab92f9 Mon Sep 17 00:00:00 2001
From: adrian adewunmi
Date: Wed, 22 Apr 2026 16:02:31 +0100
Subject: [PATCH 2/3] refactor(core): remove unused duplicate error views
module
---
core/error_views.py | 22 ----------------------
1 file changed, 22 deletions(-)
delete mode 100644 core/error_views.py
diff --git a/core/error_views.py b/core/error_views.py
deleted file mode 100644
index 081b88b..0000000
--- a/core/error_views.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# path: core/error_views.py
-"""Custom error handlers for ReturnHub."""
-
-from __future__ import annotations
-
-from django.http import HttpRequest, HttpResponse
-from django.shortcuts import render
-
-
-def error_403(request: HttpRequest, exception: Exception) -> HttpResponse:
- """Render the branded forbidden page."""
- return render(request, "errors/403.html", status=403)
-
-
-def error_404(request: HttpRequest, exception: Exception) -> HttpResponse:
- """Render the branded not-found page."""
- return render(request, "errors/404.html", status=404)
-
-
-def error_500(request: HttpRequest) -> HttpResponse:
- """Render the branded server-error page."""
- return render(request, "errors/500.html", status=500)
\ No newline at end of file
From cee6ecf015ea8582d9b784583984002802c6a48b Mon Sep 17 00:00:00 2001
From: adrian adewunmi
Date: Wed, 22 Apr 2026 16:05:15 +0100
Subject: [PATCH 3/3] refactor(ui): use neutral sign-in CTA on branded error
pages
---
templates/errors/403.html | 2 +-
templates/errors/404.html | 2 +-
templates/errors/500.html | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/templates/errors/403.html b/templates/errors/403.html
index ed35ebf..727799a 100644
--- a/templates/errors/403.html
+++ b/templates/errors/403.html
@@ -16,7 +16,7 @@ This surface is outside your current access level.