Sha256: 57711156a3c224326f6bdfdd67046a63287320a47687dbcfc5cbdbefc618c228
Contents?: true
Size: 736 Bytes
Versions: 4
Compression:
Stored size: 736 Bytes
Contents
require 'wayback/error' module Wayback class Error # Raised when Wayback returns a 5xx HTTP status code class ServerError < Wayback::Error MESSAGE = "Server Error" # Create a new error from an HTTP environment # # @param response [Hash] # @return [Wayback::Error] def self.from_response(response={}) new(nil, response[:response_headers]) end # Initializes a new ServerError object # # @param message [String] # @param response_headers [Hash] # @return [Wayback::Error::ServerError] def initialize(message=nil, response_headers={}) super((message || self.class.const_get(:MESSAGE)), response_headers) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems