This is an automated email from the ASF dual-hosted git repository.

curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  c459c78   Make 404 error appear properly
c459c78 is described below

commit c459c78f5a0625d88ade19eb551aebcf6c48dab8
Author: Shane Curcuru <[email protected]>
AuthorDate: Mon May 29 11:47:39 2017 -0400

    Make 404 error appear properly
    
    Reported by @rubys - happy now? :smile_cat:
---
 www/roster/main.rb                                     |  6 +++---
 www/roster/views/errors.html.rb                        |  4 ++--
 www/roster/views/{errors.html.rb => not_found.html.rb} | 11 +++++++----
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/www/roster/main.rb b/www/roster/main.rb
index 2d959e4..8e4ba00 100755
--- a/www/roster/main.rb
+++ b/www/roster/main.rb
@@ -227,12 +227,12 @@ get '/env' do
   JSON.pretty_generate(env: env, ENV: ENV.to_h, asset: asset)
 end
 
-error do
+not_found do
   @errors = env
-  _html :errors
+  _html :not_found
 end
 
-not_found do
+error do
   @errors = env
   _html :errors
 end
diff --git a/www/roster/views/errors.html.rb b/www/roster/views/errors.html.rb
index 648207d..53ff55f 100644
--- a/www/roster/views/errors.html.rb
+++ b/www/roster/views/errors.html.rb
@@ -7,12 +7,12 @@ _html do
     _link rel: 'stylesheet', href: 'stylesheets/app.css'
   end
   _body? do
-    _whimsy_header 'Error - Apache Whimsy'
+    _whimsy_header '500 Error - Apache Whimsy'
     _whimsy_content do
       _div.row do
         _div.col_sm_10 do
           _div.panel.panel_danger do
-            _div.panel_heading {_h3.panel_title 'Error - Apache Whimsy'}
+            _div.panel_heading {_h3.panel_title '500 - Internal Server Error'}
             _div.panel_body do
               _p '"Hey, Rocky! Watch me pull a rabbit out of my hat."'
               _p 'Oh, snap!  Something went wrong.  Error details follow:'
diff --git a/www/roster/views/errors.html.rb 
b/www/roster/views/not_found.html.rb
similarity index 56%
copy from www/roster/views/errors.html.rb
copy to www/roster/views/not_found.html.rb
index 648207d..d1360fe 100644
--- a/www/roster/views/errors.html.rb
+++ b/www/roster/views/not_found.html.rb
@@ -7,15 +7,18 @@ _html do
     _link rel: 'stylesheet', href: 'stylesheets/app.css'
   end
   _body? do
-    _whimsy_header 'Error - Apache Whimsy'
+    _whimsy_header '404 Error - Apache Whimsy'
     _whimsy_content do
       _div.row do
         _div.col_sm_10 do
           _div.panel.panel_danger do
-            _div.panel_heading {_h3.panel_title 'Error - Apache Whimsy'}
+            _div.panel_heading {_h3.panel_title '404 - Not Found - Apache 
Whimsy'}
             _div.panel_body do
-              _p '"Hey, Rocky! Watch me pull a rabbit out of my hat."'
-              _p 'Oh, snap!  Something went wrong.  Error details follow:'
+              _ %{ Whatever you're looking for is not there.  
+                We'll double-check our crystal balls, but you should 
+                probably try another 
+              }
+              _a 'magic link.', href: 'https://whimsy.apache.org/roster/'
               _ul do
                 %w( sinatra.error sinatra.route REQUEST_URI ).each do |k|
                   _li "#{k} = #{@errors[k]}"

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to