Exception: IBM::Cloud::SDKHTTP::Exceptions::HttpStatusError

Inherits:
ExceptionWithResponse show all
Defined in:
lib/ibm/cloud/sdk_http/exceptions.rb

Overview

An exception for http status errors with a response attribute.

Instance Attribute Summary

Attributes inherited from ExceptionWithResponse

#response

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ HttpStatusError

Returns a new instance of HttpStatusError.



23
24
25
26
# File 'lib/ibm/cloud/sdk_http/exceptions.rb', line 23

def initialize(response)
  msg = "Invalid status #{response.code} for url \"#{response.url}\", #{response.reason}. #{response.body}"
  super(msg, response)
end