Sha256: 615a25e6381adcd804bc7f89cf257a689347d839f277d77a34010e01878cf85e

Contents?: true

Size: 661 Bytes

Versions: 8

Compression:

Stored size: 661 Bytes

Contents

module OpenIDConnect
  class Exception < StandardError; end

  class HttpError < Exception
    attr_accessor :status, :response
    def initialize(status, message, response = nil)
      super message
      @status = status
      @response = response
    end
  end

  class BadRequest < HttpError
    def initialize(message = nil, response = nil)
      super 400, message, response
    end
  end

  class Unauthorized < HttpError
    def initialize(message = nil, response = nil)
      super 401, message, response
    end
  end

  class Forbidden < HttpError
    def initialize(message = nil, response = nil)
      super 403, message, response
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
openid_connect-0.0.12 lib/openid_connect/exception.rb
openid_connect-0.0.11 lib/openid_connect/exception.rb
openid_connect-0.0.10 lib/openid_connect/exception.rb
openid_connect-0.0.9 lib/openid_connect/exception.rb
openid_connect-0.0.8 lib/openid_connect/exception.rb
openid_connect-0.0.7 lib/openid_connect/exception.rb
openid_connect-0.0.6 lib/openid_connect/exception.rb
openid_connect-0.0.5 lib/openid_connect/exception.rb