Exception: HelloSign::Error::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/hello_sign/error.rb

Overview

Custom error class for rescuing from all HelloSign errors.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_status, response_body = nil, request_uri) ⇒ Error

Returns a new instance of Error.



31
32
33
34
35
36
# File 'lib/hello_sign/error.rb', line 31

def initialize(response_status, response_body = nil, request_uri)
  @request_uri = request_uri
  @response_body = response_body
  @response_status = response_status
  super(human_readable_message)
end

Instance Attribute Details

#request_uriObject

Returns the value of attribute request_uri.



29
30
31
# File 'lib/hello_sign/error.rb', line 29

def request_uri
  @request_uri
end

#response_bodyObject

Returns the value of attribute response_body.



29
30
31
# File 'lib/hello_sign/error.rb', line 29

def response_body
  @response_body
end

#response_statusObject

Returns the value of attribute response_status.



29
30
31
# File 'lib/hello_sign/error.rb', line 29

def response_status
  @response_status
end