Sha256: 4e5500ba2fe8d81d6cb30245cb0302baa35b84e3276bf9c116fa0214b0db00b5
Contents?: true
Size: 893 Bytes
Versions: 10
Compression:
Stored size: 893 Bytes
Contents
module Bamboozled class HTTPError < StandardError attr_reader :response attr_reader :params attr_reader :hint def initialize(response, params = {}, hint = nil) @response = response @params = params @hint = hint super(response) end def to_s "#{self.class} : #{response.code} #{response.body}".tap do |msg| msg << "\n#{hint}" if hint end end end class BadRequest < HTTPError; end class Unauthorized < HTTPError; end class AuthenticationFailed < HTTPError; end class Forbidden < HTTPError; end class NotFound < HTTPError; end class NotAcceptable < HTTPError; end class Conflict < HTTPError; end class LimitExceeded < HTTPError; end class InternalServerError < HTTPError; end class GatewayError < HTTPError; end class ServiceUnavailable < HTTPError; end class InformBamboo < HTTPError; end end
Version data entries
10 entries across 10 versions & 2 rubygems