aboutsummaryrefslogtreecommitdiff
path: root/views/error.ejs
blob: cee0fd2bb3f732f76f13fcaab24708668f7f0339 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!--
  ~ MIT License
  ~
  ~ Copyright (c) 2022- Equestria.dev Developers
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in all
  ~ copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~ SOFTWARE.
  ~
  -->
<%- include("./partials/header.ejs", {title: "Error " + code}) %>

<div id="navbar-skipper">
    <br>

    <div class="container">
        <h1 style="text-align: center;"><%= code %></h1>
        <h2 style="text-align: center;"><%= message %></h2>
        <p style="text-align: center;">An error occurred on our side, and we can't show this page for now. Please try again later! If you report a bug, a developer might ask you to give the weird code stuff below.</p>
        <a class="btn btn-primary" href="/" style="margin-left:auto;margin-right:auto;display:block;width:max-content;">Go home</a>
        <br>
        <details>
            <summary style="opacity: .5;">Show weird code stuff</summary>
            <div style="background-color:rgba(0, 0, 0, .25);border-radius:10px;margin-top:10px;padding:10px;">
                <ul>
                    <li>URL: <%= req.url %></li>
                    <%

                    let ua = new UAParser(req.header('user-agent'));

                    %>
                    <li>Browser: <%= ua.getBrowser().name + " " + ua.getBrowser().version %></li>
                    <li>Engine: <%= ua.getEngine().name + " " + ua.getEngine().version %></li>
                    <li>Vapor Trail Version: <%= version %> (build <%= build %>)</li>
                    <li>Core Version: <%= process.version %></li>
                    <li>Memory (RSS): <%= (process.memoryUsage().rss / 1024).toFixed(2) %>K</li>
                    <li>Memory (Heap Total): <%= (process.memoryUsage().heapTotal / 1024).toFixed(2) %>K</li>
                    <li>Memory (Heap Used): <%= (process.memoryUsage().heapUsed / 1024).toFixed(2) %>K</li>
                    <li>Memory (External): <%= (process.memoryUsage().heapUsed / 1024).toFixed(2) %>K</li>
                    <li>Memory (Array Buffers): <%= (process.memoryUsage().arrayBuffers / 1024).toFixed(2) %>K</li>
                </ul>
                <% if (typeof err !== "undefined") { %>
                <pre><%= err.stack %></pre>
                <% } %>
            </div>
        </details>
    </div>
</div>

<%- include("./partials/footer.ejs") %>