Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Let exceptions bubble up #3

Merged
merged 1 commit into from

2 participants

@sr
sr commented

disable :raise_errors, blabla

@sr sr let exceptions bubble up
:punch: sinatra in the throat
125d38b
@atmos atmos merged commit be1463a into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 12, 2011
  1. @sr

    let exceptions bubble up

    sr authored
    :punch: sinatra in the throat
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/sinatra/auth/github.rb
View
6 lib/sinatra/auth/github.rb
@@ -10,6 +10,9 @@ module Github
# Simple way to serve an image early in the stack and not get blocked by
# application level before filters
class AccessDenied < Sinatra::Base
+ enable :raise_errors
+ disable :show_exceptions
+
get '/_images/securocat.png' do
send_file(File.join(File.dirname(__FILE__), "views", "securocat.png"))
end
@@ -17,6 +20,9 @@ class AccessDenied < Sinatra::Base
# The default failure application, this is overridable from the extension config
class BadAuthentication < Sinatra::Base
+ enable :raise_errors
+ disable :show_exceptions
+
helpers do
def unauthorized_template
@unauthenticated_template ||= File.read(File.join(File.dirname(__FILE__), "views", "401.html"))
Something went wrong with that request. Please try again.