Module: Plivo::Exceptions

Defined in:
lib/plivo/exceptions.rb

Overview

The exceptions module that helps in passing on errors to the user in a better way.

Constant Summary collapse

PlivoRESTError =

This is Plivo’s base error and will be raised when there is an unknown error that is not covered by other errors.

Class.new(StandardError)
ValidationError =

This will be raised when A parameter is missing or is invalid while accessing resource.

Class.new(PlivoRESTError)
AuthenticationError =

This will be raised when there is an an error authenticating the request.

It is because there were no authentication credentials found or passed or the auth credentials that were found or passed were incorrect.

Class.new(PlivoRESTError)
InvalidRequestError =

This will be raised when one or more parameters passed to Plivo servers is invalid.

More specific error message will be displayed wherever possible.

Class.new(PlivoRESTError)
PlivoServerError =

This will be raised when there is a server error on the Plivo end.

This is rarely encountered. You might want to catch this error and retry the request if needed.

If retrying doesn’t help, please contact support.plivo.com immediately.

Class.new(PlivoRESTError)
PlivoXMLError =

This will be raised when there is an XML generation error.

Usually, the reason why this error is raised will be included.

Class.new(PlivoRESTError)
ResourceNotFoundError =

This will be raised when there is an authentication error

Class.new(PlivoRESTError)