Added a customized error-page
authorKai Moritz <kai@juplo.de>
Sun, 20 Sep 2020 13:05:12 +0000 (15:05 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 3 Oct 2020 12:01:06 +0000 (14:01 +0200)
src/main/resources/templates/error.html [new file with mode: 0644]

diff --git a/src/main/resources/templates/error.html b/src/main/resources/templates/error.html
new file mode 100644 (file)
index 0000000..e30ef9e
--- /dev/null
@@ -0,0 +1,50 @@
+<!doctype html>
+<html xmlns:th="http://www.thymeleaf.org">
+  <head>
+    <title th:text="|${status}: ${error}">XXX: ERROR</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+  </head>
+  <body>
+    <h1 th:text="|${status}: ${error}">XXX: ERROR</h1>
+      <table>
+        <tbody>
+          <tr>
+            <th scope="row">Status</th>
+            <td th:text="${status}">ERROR.STATUS</td>
+          </tr>
+          <tr>
+            <th scope="row">Error</th>
+            <td th:text="${error}">ERROR.ERROR</td>
+          </tr>
+          <tr th:if="!${#strings.isEmpty(message)}">
+            <th scope="row">Message</th>
+            <td th:text="${message}">ERROR.MESSAGE</td>
+          </tr>
+          <tr th:if="!${#strings.isEmpty(requestId)}">
+            <th scope="row">Request-ID</th>
+            <td th:text="${requestId}">ERROR.REQUEST_ID</td>
+          </tr>
+          <tr>
+            <th scope="row">Timstamp</th>
+            <td th:text="${timestamp}">ERROR.TIMESTAMP</td>
+          </tr>
+          <tr th:if="!${#strings.isEmpty(path)}">
+            <th scope="row">Path</th>
+            <td th:text="${path}">ERROR.PATH</td>
+          </tr>
+          <!--/**-->
+          <tr th:if="!${#strings.isEmpty(trace)}">
+            <th scope="row">Trace</th>
+            <td>
+              <div>
+                <pre th:text="${trace}">ERROR.TRACE</pre>
+              </div>
+            </td>
+          </tr>
+          <!--**/-->
+        </tbody>
+      </table>
+      <p><a href="#" th:href="@{/}">Back to HOME</a>
+    </div>
+  </body>
+</html>