class CompaniesHouse::APIError
Represents any response from the API which is not a 200 OK
Attributes
response[R]
status[R]
Public Class Methods
new(msg, response = nil)
click to toggle source
Calls superclass method
# File lib/companies_house/api_error.rb, line 8 def initialize(msg, response = nil) if response msg = "#{msg} - HTTP #{response.code}" @status = response.code end super(msg) @response = response end