Module: Astroboa

Defined in:
lib/astroboa-rb/clienterror.rb,
lib/astroboa-rb.rb,
lib/astroboa-rb/client.rb,
lib/astroboa-rb/version.rb

Overview

This is the base AstroboaClient exception class. For your convenience you do not need to write rescue code for each astroboa client api call. If an error occurs the exception is not directly raised but rather it is passed to either an exception hadling error block that you may provide in each api call or otherwise to the generic error callback that you have specified by means of the “on_error” method if you provide no error handling block and no generic error callback is set then a non successful api call returns nil as a response All succeful api calls return non nil responses so a quick and easy way to check the success of the call without writing error handling blocks is to check for a non nil response. You can get the status code of the api call (i.e the corresponding http code) by e.api_code. if any response related to the error has been returned, you may see the response by e.api_response A message related to the error is available at e.message Use e.inspet or e.to_s to get the error message as well as the api response

Defined Under Namespace

Classes: Client, ClientError

Constant Summary collapse

VERSION =
"0.4.0"