class MagicAdmin::RequestError

RequestError Class

Attributes

http_code[R]

attribute reader for http response code

http_error_code[R]

attribute reader for http response error code

http_message[R]

attribute reader for http response message

http_method[R]

attribute reader for http request method

http_request_data[R]

attribute reader for http request data

http_request_params[R]

attribute reader for http request params

http_response[R]

attribute reader for http response

http_status[R]

attribute reader for http response status

Public Class Methods

new(message, opt = {}) click to toggle source

Description:

The constructor allows you to specify error message
and HTTP request and response info

Arguments:

message: request error message.
opt: hash of request and response info of following keys:
  http_status
  http_code
  http_response
  http_message
  http_error_code
  http_request_params
  http_request_data
  http_method

Returns:

A Error object that provides additional error info for magic api call.
Calls superclass method MagicAdmin::MagicError::new
# File lib/magic-admin/errors.rb, line 67
def initialize(message, opt = {})
  super(message)
  @http_status = opt[:http_status]
  @http_code = opt[:http_code]
  @http_response = opt[:http_response]
  @http_message = opt[:http_message]
  @http_error_code = opt[:http_error_code]
  @http_request_params = opt[:http_request_params]
  @http_request_data = opt[:http_request_data]
  @http_method = opt[:http_method]
end