class Antbird::Client::ApiError
Attributes
response[R]
status[R]
Public Class Methods
new(response)
click to toggle source
Calls superclass method
# File lib/antbird/client/errors.rb, line 6 def initialize(response) @response = response @status = response.status body = response.body @error = body["error"] if body.is_a?(Hash) && body.key?("error") message = @error || body.to_s super message end