Error handling
This API uses standard HTTP response codes to indicate whether a method completed successfully.
HTTP response codes in the 2xx range indicate success. A response in the 4xx range is some sort of failure, and a response in the 5xx range usually indicates an internal system error that can't be resolved by the user. The following table describes the HTTP error codes.
| HTTP Error Code | Description | Recovery |
|---|---|---|
400 |
Bad Request | The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all required parameters in your request. |
401 |
Unauthorized | You are not authorized to make this request. Log in to IBM Cloud to get an IAM token and try again. If this error persists, contact the account owner to check your permissions. |
404 |
Not Found | The requested resource could not be found or you do not have permission to discover the requested resource. If this error persists, contact the account owner to check your permissions. |
405 |
Method Not Allowed | The provided HTTP method is not supported by the endpoint. Review your chosen method against the API documentation. |
409 |
Conflict | A resource with this name already exists or is already in the requested state. For a new resource, choose a unique name. |
429 |
Too Many Requests | Overuse of the API. Inspect the response headers to find the retry-after time. |
500 |
Internal Server Error | The server encountered an unexpected condition that prevented it from fulfilling the request. If this error persists, contact the support team. |
503 |
Service unavailable | MQ on Cloud is currently unavailable. Your request could not be processed. Wait a few minutes and try again. |
Understanding error models
This API follows IBM Cloud API Handbook Errors standards, ensuring consistency across error models.
Where possible, error responses will include information to assist in understanding the root cause
of the error. For example:
{
"errors": [
{
"code": "bad_request",
"message": "Bad request for service instance 6b79b864-a049-4d9e-862d-99bc79759396, channel [CLOUD.APP.FAKE] is not configurable as an AMS channel for target queuemanager",
"more_info": "https://cloud.ibm.com/apidocs/mq-on-cloud#set-certificate-ams-channels",
"target": {
"type": "field",
"name": "channels"
}
}
],
"trace": "afe0399f-d99a-4723-a5f1-6deb1e8e1703",
"status_code": 400
}At a minimum, the code, message,
trace and status_code fields will be provided.
If you need to raise a support ticket on IBM Cloud®, or
raise a support ticket on
AWS for an error, include these fields in the
support ticket to enable timely debug and resolution. If more information is available, such as
which field is incomplete, invalid or otherwise erroneous, the more_info and
target fields will be populated to focus the user towards the problem area(s).