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. --- webmentions_ssg/templates/received_detail.html | 27 +++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'webmentions_ssg/templates/received_detail.html') diff --git a/webmentions_ssg/templates/received_detail.html b/webmentions_ssg/templates/received_detail.html index 091e2e4..32d3e05 100644 --- a/webmentions_ssg/templates/received_detail.html +++ b/webmentions_ssg/templates/received_detail.html @@ -5,6 +5,7 @@ SPDX-License-Identifier: BSD-3-Clause --> {% extends "base.html" %} +{% from "includes/received_failure.html" import render_failure %} {% set status_presentation = { "received": { "badge": "text-bg-info", @@ -78,7 +79,7 @@ SPDX-License-Identifier: BSD-3-Clause
Failure reason
{% if webmention.failure_reason %} -
{{ webmention.failure_reason }}
+ {{ render_failure(webmention.failure_reason) }} {% else %} None {% endif %} @@ -121,17 +122,21 @@ SPDX-License-Identifier: BSD-3-Clause
    {% for event in history %} {% set event_style = status_presentation.get(event.status, {"badge": "text-bg-secondary", "label": "Unknown"}) %} -
  1. -
    - {{ event_style.label }} - {{ event.action }} - +
  2. +
    +
    + {{ event_style.label }} + {{ event.action }} + +
    +
    Recovery attempts: {{ event.recovery_attempts }}
    + {% if event.failure_reason %} +
    {{ render_failure(event.failure_reason) }}
    + {% endif %}
    -
    Recovery attempts: {{ event.recovery_attempts }}
    - {% if event.failure_reason %} -
    {{ event.failure_reason }}
    - {% endif %}
  3. {% endfor %}
-- cgit v1.3.1