Exception: CC::Service::HTTPError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cc/service/response_check.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, env) ⇒ HTTPError

Returns a new instance of HTTPError.



6
7
8
9
10
11
12
13
# File 'lib/cc/service/response_check.rb', line 6

def initialize(message, env)
  @response_body = env[:body]
  @status = env[:status]
  @params = env[:params]
  @endpoint_url = env[:url].to_s

  super(message)
end

Instance Attribute Details

#endpoint_urlObject (readonly)

Returns the value of attribute endpoint_url.



3
4
5
# File 'lib/cc/service/response_check.rb', line 3

def endpoint_url
  @endpoint_url
end

#paramsObject (readonly)

Returns the value of attribute params.



3
4
5
# File 'lib/cc/service/response_check.rb', line 3

def params
  @params
end

#response_bodyObject (readonly)

Returns the value of attribute response_body.



3
4
5
# File 'lib/cc/service/response_check.rb', line 3

def response_body
  @response_body
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/cc/service/response_check.rb', line 3

def status
  @status
end

#user_messageObject

Returns the value of attribute user_message.



4
5
6
# File 'lib/cc/service/response_check.rb', line 4

def user_message
  @user_message
end