Fork me on GitHub

Class errors.CloudError


Defined in: errors.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
errors.CloudError(message, options)

Base cloud error class.

Field Summary
Field Attributes Field Name and Description
 

Error message.

 

HTTP status code (if any).

<static>  
errors.CloudError.TYPES

Prototype of all available errors.

Method Summary
Method Attributes Method Name and Description
 
 
 
 
 
Class Detail
errors.CloudError(message, options)

Base cloud error class.

Note

A CloudError is generally thrown only on a failed cloud operation, so that calling code can make intelligent retry / failure handling decisions.

Sunny throws straight Error's for programming / calling errors (e.g., missing required parameters, invalid parameter input). Any Error indicates a code and/or Sunny library error and should be fixed.

Parameters:
{String} message Optional
Exception message.
{Object} options Optional
Options object.
{Error} options.error Optional
Underlying error object.
{Object|Array|String} options.types Optional
List/object of error types.
{HttpResponse} options.response Optional
Offending response object.
Field Detail
{string} message

Error message.


{number} statusCode

HTTP status code (if any).


<static> errors.CloudError.TYPES

Prototype of all available errors.

Method Detail
{boolean} isAlreadyOwnedByYou()
Returns:
{boolean} True if given error type.

{boolean} isInvalidName()
Returns:
{boolean} True if given error type.

{boolean} isNotEmpty()
Returns:
{boolean} True if given error type.

{boolean} isNotFound()
Returns:
{boolean} True if given error type.

{boolean} isNotOwner()
Returns:
{boolean} True if given error type.