From 63af533d98aac82b6d4f069b217d3e837285508d Mon Sep 17 00:00:00 2001
From: Dennis Fink
Date: Tue, 17 Nov 2026 22:10:40 +0100
Subject: feat(receiver): explain received Webmention failures
Map known verification failures to human-readable explanations and show
suggested next steps only for receiver-controlled problems while
retaining raw reasons.
Return a specific validation error when targets are outside
`ALLOWED_TARGET_HOSTNAMES` and reuse the guidance for status history.
---
.../templates/includes/received_failure.html | 22 ++++++++++++++++++
webmentions_ssg/templates/received_detail.html | 27 +++++++++++++---------
2 files changed, 38 insertions(+), 11 deletions(-)
create mode 100644 webmentions_ssg/templates/includes/received_failure.html
(limited to 'webmentions_ssg/templates')
diff --git a/webmentions_ssg/templates/includes/received_failure.html b/webmentions_ssg/templates/includes/received_failure.html
new file mode 100644
index 0000000..65ed7a3
--- /dev/null
+++ b/webmentions_ssg/templates/includes/received_failure.html
@@ -0,0 +1,22 @@
+
+
+{% macro render_failure(reason) %}
+ {% set guidance = reason | received_failure_guidance %}
+ {% if guidance %}
+
{{ guidance.explanation }}
+ {% if guidance.next_step %}
+
Suggested next step: {{ guidance.next_step }}
+ {% endif %}
+
+ Technical reason
+
{{ reason }}
+
+ {% else %}
+
{{ reason }}
+
Check the application logs for details before reverifying.