mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Show error message if precompiled PDF cannot be opened
If PDF files have a validation error which means that they can't be opened by PyPDF2 we would previously show the 500 status error page. We now catch PyPDF2.utils.PdfReadErrors so that we can display a custom error message on the notification page instead.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Letter
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-large">Letter</h1>
|
||||
|
||||
<p>
|
||||
Provided as PDF on {{ created_at|format_datetime_short }}
|
||||
</p>
|
||||
<p class="notification-status-cancelled">
|
||||
Couldn’t read this file
|
||||
</p>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user