Exception: WhatsappSdk::Api::Responses::HttpResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/whatsapp_sdk/api/responses/http_response_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_status:, body:) ⇒ HttpResponseError

Returns a new instance of HttpResponseError.



9
10
11
12
13
14
# File 'lib/whatsapp_sdk/api/responses/http_response_error.rb', line 9

def initialize(http_status:, body:)
  super
  @http_status = http_status
  @body = body
  @error_info = GenericErrorResponse.build_from_response(response: body)
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'lib/whatsapp_sdk/api/responses/http_response_error.rb', line 7

def body
  @body
end

#error_infoObject (readonly)

Returns the value of attribute error_info.



7
8
9
# File 'lib/whatsapp_sdk/api/responses/http_response_error.rb', line 7

def error_info
  @error_info
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



7
8
9
# File 'lib/whatsapp_sdk/api/responses/http_response_error.rb', line 7

def http_status
  @http_status
end