Exception: SocialPlus::WebApi::HttpResponseError

Inherits:
ApiError
  • Object
show all
Defined in:
lib/social_plus/web_api/http_response_error.rb

Overview

An Exception class raised when SocialPlus Web API reports http response error

Constant Summary

Constants inherited from ApiError

ApiError::EXCEPTION_CLASSES

Instance Attribute Summary

Attributes inherited from ApiError

#code

Instance Method Summary collapse

Methods inherited from ApiError

exception_from_api_result

Constructor Details

#initialize(response) ⇒ HttpResponseError

Returns a new instance of HttpResponseError.

Parameters:

  • response (Net::HTTPResponse)

    HTTP Response (except 200 OK)



10
11
12
13
14
15
# File 'lib/social_plus/web_api/http_response_error.rb', line 10

def initialize(response)
  super(
    'message' => response.message,
    'code'    => response.code.to_i
  )
end