Browse Source

Creator error page

master
Dylan Baker 4 years ago
parent
commit
df4a96dc05
3 changed files with 20 additions and 0 deletions
  1. 4
    0
      web/assets/styles/global.scss
  2. 5
    0
      web/server.rb
  3. 11
    0
      web/views/error.erb

+ 4
- 0
web/assets/styles/global.scss View File

@@ -56,3 +56,7 @@ blockquote {
56 56
 .btn--small {
57 57
   font-size: 14px;
58 58
 }
59
+
60
+.center {
61
+  text-align: center;
62
+}

+ 5
- 0
web/server.rb View File

@@ -15,6 +15,11 @@ class VLVSearch < Sinatra::Base
15 15
       secret: ENV['SESSION_SECRET']
16 16
 
17 17
   set :environment, ENV['APP_ENV'] == 'production' ? :production : :development
18
+  set :show_exceptions, ENV['APP_ENV'] == 'production'
19
+
20
+  error 500 do
21
+    erb :error, { layout: :layout }
22
+  end
18 23
 
19 24
   get '/' do
20 25
     redirect '/login' unless signed_in?

+ 11
- 0
web/views/error.erb View File

@@ -0,0 +1,11 @@
1
+<div class="center">
2
+  <h3>Something went wrong!</h3>
3
+  <p>
4
+    The site administrator has been notified but feel free to
5
+    <%= external_link(
6
+      'http://board.vivalavinyl.com/message/create/reddwarf',
7
+      'send a PM'
8
+    ) %>
9
+    as well.
10
+  </p>
11
+</div>

Loading…
Cancel
Save