Exception: Harborapp::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/harborapp/api_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, headers, body) ⇒ ApiError

Returns a new instance of ApiError.



4
5
6
7
8
# File 'lib/harborapp/api_error.rb', line 4

def initialize(status, headers, body)
  self.status = status
  self.headers = headers
  self.errors = body["errors"]
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



3
4
5
# File 'lib/harborapp/api_error.rb', line 3

def errors
  @errors
end

#headersObject

Returns the value of attribute headers.



3
4
5
# File 'lib/harborapp/api_error.rb', line 3

def headers
  @headers
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/harborapp/api_error.rb', line 3

def status
  @status
end