Sha256: 96223ebb9c2eafa32abfaf5e6e239713b98be15bbf913e56e72c1ad78d4dd83b
Contents?: true
Size: 1.07 KB
Versions: 56
Compression:
Stored size: 1.07 KB
Contents
module Resourceful # This exception used to indicate that the request did not succeed. # The HTTP response is included so that the appropriate actions can # be taken based on the details of that response class UnsuccessfulHttpRequestError < Exception attr_reader :http_response, :http_request # Initialize new error from the HTTP request and response attributes. def initialize(http_request, http_response) super("#{http_request.method} request to <#{http_request.uri}> failed with code #{http_response.code}") @http_request = http_request @http_response = http_response end end class MalformedServerResponse < UnsuccessfulHttpRequestError end # Exception indicating that the server used a content coding scheme # that Resourceful is unable to handle. class UnsupportedContentCoding < Exception end # Raised when a body is supplied, but not a content-type header class MissingContentType < ArgumentError def initialize super("A Content-Type must be specified when an entity-body is supplied.") end end end
Version data entries
56 entries across 56 versions & 6 rubygems