diff options
| author | Dennis Fink | 2026-11-17 22:10:40 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-17 22:10:40 +0100 |
| commit | 63af533d98aac82b6d4f069b217d3e837285508d (patch) | |
| tree | 4ac11960f9676d3bb5a6f62204ef139862734209 /webmentions_ssg/templates/includes/received_failure.html | |
| parent | acd1f42847786963fc4aaeed884c3091700c9e35 (diff) | |
| download | webmentions-ssg-63af533d98aac82b6d4f069b217d3e837285508d.tar.gz webmentions-ssg-63af533d98aac82b6d4f069b217d3e837285508d.zip | |
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.
Diffstat (limited to 'webmentions_ssg/templates/includes/received_failure.html')
| -rw-r--r-- | webmentions_ssg/templates/includes/received_failure.html | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ +<!-- +SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me> + +SPDX-License-Identifier: BSD-3-Clause +--> + +{% macro render_failure(reason) %} + {% set guidance = reason | received_failure_guidance %} + {% if guidance %} + <div class="text-break">{{ guidance.explanation }}</div> + {% if guidance.next_step %} + <div class="mt-1 text-break"><strong>Suggested next step:</strong> {{ guidance.next_step }}</div> + {% endif %} + <details class="mt-2"> + <summary class="small text-body-secondary">Technical reason</summary> + <div class="small text-break text-pre-formatted">{{ reason }}</div> + </details> + {% else %} + <div class="text-break text-pre-formatted">{{ reason }}</div> + <div class="small text-body-secondary mt-1">Check the application logs for details before reverifying.</div> + {% endif %} +{% endmacro %} |
