Sha256: 08592e77c880a2f67d242997c2007239135bbf8e661e02cb9ec2f92186bc77ae
Contents?: true
Size: 732 Bytes
Versions: 30
Compression:
Stored size: 732 Bytes
Contents
module Parliament # An error raised when a 5xx status code is returned by Net::HTTP inside of Parliament::Request. # # @see Parliament::ClientError # # @since 0.6.0 class ServerError < Parliament::NetworkError # @param [String] url the url that caused the Parliament::ServerError # @param [Net::HTTPServerError] response the Net:HTTPServerError that caused the Parliament::ServerError # # @example Creating a Parliament::ServerError # url = 'http://localhost:3030/foo/bar' # # response = Net::HTTP.get_response(URI(url)) # # raise Parliament::ServerError.new(url, response) if response.is_a?(Net::HTTPServerError) def initialize(url, response) super end end end
Version data entries
30 entries across 30 versions & 1 rubygems