Classes

HttpErrorError

HttpError wraps any http response which status is != 2xx.

APIErrorHttpError

APIError wraps CloudBlue Connect API errors.
Provides convenient methods to obtains error
code and error messages.
The Cloud Blue Connect JSON error looks like:

HttpError ⇐ Error

HttpError wraps any http response which status is != 2xx.

Kind: global class
Extends: Error
Category: Base

new HttpError(status, message)

Create a new instance of the HttpError class.

Param Type Description
status number the http status code.
message string an error message.

httpError.status : number

The http status code.

Kind: instance property of HttpError

APIError ⇐ HttpError

APIError wraps CloudBlue Connect API errors.
Provides convenient methods to obtains error
code and error messages.
The Cloud Blue Connect JSON error looks like:

Kind: global class
Extends: HttpError
Category: Base

new APIError(status, message)

Create a new instance of the APIError class.

Param Type Description
status number the http status code.
message string A JSON parseable object.

Example

{
   "error_code": "SYS_001",
   "errors": [
      "error message 1"
   ]
}

apiError.json ⇒ object

Returns the JSON error object.

Kind: instance property of APIError
Returns: object – The error object.

apiError.errorCode ⇒ string

Returns the error code.

Kind: instance property of APIError
Returns: string – The error code.

apiError.errors ⇒ Array

Returns an array of error messages.

Kind: instance property of APIError
Returns: Array – The error messages.

apiError.status : number

The http status code.

Kind: instance property of APIError
Overrides: status

Is this page helpful?
Translate with Google
Copied to clipboard