Exception: CommunityZero::RestError

Inherits:
Error
  • Object
show all
Defined in:
lib/community_zero/errors/rest_error.rb

Overview

A general error for failed communicate with a REST API.

Author:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_code, error) ⇒ RestError

Returns a new instance of RestError.



25
26
27
28
# File 'lib/community_zero/errors/rest_error.rb', line 25

def initialize(response_code, error)
  @response_code = response_code
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



23
24
25
# File 'lib/community_zero/errors/rest_error.rb', line 23

def error
  @error
end

#response_codeObject (readonly)

Returns the value of attribute response_code.



23
24
25
# File 'lib/community_zero/errors/rest_error.rb', line 23

def response_code
  @response_code
end