blob: 9a36d894f459f5bdf6c4a4b4ac971901a3f5449c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<!--
SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me>
SPDX-License-Identifier: BSD-3-Clause
-->
{% macro render_failure(reason, direction="received") %}
{% if direction == "sent" %}
{% set guidance = reason | sent_failure_guidance %}
{% else %}
{% set guidance = reason | received_failure_guidance %}
{% endif %}
{% 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 {{ 'resending' if direction == 'sent' else 'reverifying' }}.</div>
{% endif %}
{% endmacro %}
|