{% 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 %}
{{ 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 {{ 'resending' if direction == 'sent' else 'reverifying' }}.
{% endif %} {% endmacro %}