|
8 | 8 | {% endblock %} |
9 | 9 |
|
10 | 10 | {% block content %} |
| 11 | +{% set errorMessage = err.message | default("An error occurred, please try again later.", true) %} |
11 | 12 | {{ govukErrorSummary({ |
12 | 13 | titleText: "There’s a problem", |
13 | 14 | errorList: [ |
14 | 15 | { |
15 | | - text: err.message, |
| 16 | + text: errorMessage, |
16 | 17 | href: "#bad-upload" |
17 | 18 | } |
18 | 19 | ] |
|
21 | 22 | <div class="govuk-grid-row"> |
22 | 23 | <div class="govuk-grid-column-two-thirds"> |
23 | 24 | {# Display specific error details for certain errors else show detail if available #} |
24 | | - {% if err.message == "SSL certificate verification failed" %} |
| 25 | + {% if errorMessage == "SSL certificate verification failed" %} |
25 | 26 | <p class="govuk-body" id="bad-upload" tabindex="-1"> |
26 | 27 | The link we’re trying to access is not loading using a secure connection. We could not verify the Secure Sockets Layer (SSL) certificate. |
27 | 28 | </p> |
|
37 | 38 | </ul> |
38 | 39 |
|
39 | 40 | <p class="govuk-body">Contact your IT team for support if you need it.</p> |
40 | | - {% elif err.message == "The selected file must be a CSV, GeoJSON, GML or GeoPackage file" %} |
| 41 | + {% elif errorMessage == "The selected file must be a CSV, GeoJSON, GML or GeoPackage file" %} |
41 | 42 | <p class="govuk-body" id="bad-upload" tabindex="-1">The URL returns a HTML webpage. This must be a data file.</p> |
42 | 43 |
|
43 | 44 | <p class="govuk-body">Provide a direct link to the data file in one of the following formats:</p> |
|
51 | 52 | </ul> |
52 | 53 |
|
53 | 54 | <p class="govuk-body">Contact your IT team for support if you need it.</p> |
54 | | - {% elif err.errorDetail is iterable and err.errorDetail is not string %} |
55 | | - {% for detail in err.errorDetail %} |
56 | | - <p class="govuk-body"{% if loop.first %} id="bad-upload" tabindex="-1"{% endif %}>{{ detail }}</p> |
57 | | - {% endfor %} |
58 | | - {% elif err.errorDetail %} |
59 | | - <p class="govuk-body" id="bad-upload" tabindex="-1">{{ err.errorDetail }}</p> |
60 | 55 | {% else %} |
61 | 56 | <p class="govuk-body" id="bad-upload" tabindex="-1"> |
62 | | - Error: {{ err.message }} |
| 57 | + Error: {{ errorMessage }} |
63 | 58 | </p> |
64 | 59 | {% endif %} |
65 | 60 | <p class="govuk-body">Please <a href="/check/upload-method">try again</a> or <a |
|
0 commit comments