ErrorHttpError wraps any http response which status is != 2xx.
HttpErrorAPIError wraps CloudBlue Connect API errors.
Provides convenient methods to obtains error
code and error messages.
The Cloud Blue Connect JSON error looks like:
ErrorHttpError wraps any http response which status is != 2xx.
Kind: global class
Extends: Error
Category: Base
Error
numberCreate a new instance of the HttpError class.
| Param | Type | Description |
|---|---|---|
| status | number |
the http status code. |
| message | string |
an error message. |
numberThe http status code.
Kind: instance property of HttpError
HttpErrorAPIError 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
HttpError
objectstringArraynumberCreate 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"
]
}
objectReturns the JSON error object.
Kind: instance property of APIError
Returns: object – The error object.
stringReturns the error code.
Kind: instance property of APIError
Returns: string – The error code.
ArrayReturns an array of error messages.
Kind: instance property of APIError
Returns: Array – The error messages.
numberThe http status code.
Kind: instance property of APIError
Overrides: status