class EmpireAvenue::Error::ServerError
Raised when EmpireAvenue
returns a 5xx HTTP status code
Constants
- MESSAGE
Public Class Methods
from_response(response={})
click to toggle source
Create a new error from an HTTP environment
@param response [Hash] @return [EmpireAvenue::Error]
# File lib/empireavenue/error/server_error.rb, line 13 def self.from_response(response={}) new(nil, response[:response_headers]) end
new(message=nil, response_headers={})
click to toggle source
Initializes a new ServerError
object
@param message [String] @param response_headers [Hash] @return [EmpireAvenue::Error::ServerError]
Calls superclass method
EmpireAvenue::Error::new
# File lib/empireavenue/error/server_error.rb, line 22 def initialize(message=nil, response_headers={}) super((message || self.class.const_get(:MESSAGE)), response_headers) end