Exception: WhatsappSdk::Api::Responses::HttpResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- WhatsappSdk::Api::Responses::HttpResponseError
- Defined in:
- lib/whatsapp_sdk/api/responses/http_response_error.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#error_info ⇒ Object
readonly
Returns the value of attribute error_info.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
Instance Method Summary collapse
-
#initialize(http_status:, body:) ⇒ HttpResponseError
constructor
A new instance of HttpResponseError.
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
#body ⇒ Object (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_info ⇒ Object (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_status ⇒ Object (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 |