Exception: Basecamp::ApiClient::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
app/services/basecamp/api_client.rb

Overview

Service object: api error.

Direct Known Subclasses

NotFoundError, RateLimitError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status: nil, body: nil) ⇒ ApiError

Returns a new instance of ApiError.



28
29
30
31
32
# File 'app/services/basecamp/api_client.rb', line 28

def initialize(message, status: nil, body: nil)
  @status = status
  @body = body
  super(message)
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



26
27
28
# File 'app/services/basecamp/api_client.rb', line 26

def body
  @body
end

#statusObject (readonly)

Returns the value of attribute status.



26
27
28
# File 'app/services/basecamp/api_client.rb', line 26

def status
  @status
end