Error
HttpError wraps any http response which status is != 2xx.
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:
Error
HttpError wraps any http response which status is != 2xx.
Kind: global class
Extends: Error
Category: Base
Error
number
Create a new instance of the HttpError class.
Param | Type | Description |
---|---|---|
status | number |
the http status code. |
message | string |
an error message. |
number
The http status code.
Kind: instance property of HttpError
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
HttpError
object
string
Array
number
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"
]
}
object
Returns the JSON error object.
Kind: instance property of APIError
Returns: object
– The error object.
string
Returns the error code.
Kind: instance property of APIError
Returns: string
– The error code.
Array
Returns an array of error messages.
Kind: instance property of APIError
Returns: Array
– The error messages.
number
The http status code.
Kind: instance property of APIError
Overrides: status