mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 11:38:24 -04:00
Added some error handling if API returns an API error.
Caught the error and displayed an error PNG so it is obvious something failed. Currently it displayed a thumbnail of a png over the top of the loading page, and therefore it wasn't obvious of the state.
This commit is contained in:
committed by
Ken Tsang
parent
64e706ec76
commit
1f69d882c2
@@ -35,11 +35,17 @@
|
||||
Estimated delivery date: {{ estimated_letter_delivery_date|string|format_date_short }}
|
||||
</p>
|
||||
<p class="bottom-gutter">
|
||||
<a href="{{ url_for('main.view_letter_notification_as_preview', service_id=current_service.id, notification_id=notification_id, filetype='pdf') }}" download>Download as a PDF</a>
|
||||
</p>
|
||||
{% if not error %}
|
||||
<a href="{{ url_for('main.view_letter_notification_as_preview', service_id=current_service.id, notification_id=notification_id, filetype='pdf') }}" download>Download as a PDF</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{{ template|string }}
|
||||
{% if error %}
|
||||
Error Creating PDF Preview
|
||||
{% else %}
|
||||
{{ template|string }}
|
||||
{% endif %}
|
||||
|
||||
{% if template.template_type != 'letter' %}
|
||||
{{ ajax_block(partials, updates_url, 'status', finished=finished) }}
|
||||
|
||||
Reference in New Issue
Block a user