If the call to the AI Model Deployer RESTful API fails, an error response is usually returned which has an HTTP status code within the 4xx range or 5xx range. The following overview lists the standard HTTP status codes returned by the AI Model Deployer RESTful API in case of an error.
HTTP status code:
400 Bad Request
403 Forbidden
404 Not Found
500 Internal Server Error
Property |
AI Model Deployer RESTful API type |
---|---|
title |
string |
status |
int |
detail |
string |
instance |
string |
error Id |
int |
module name |
string |
errors |
string |
advise |
string |
The Status property has the same value as the HTTP status code.
If present, the error Id property gives additional information about the error. An API client may make decisions based on this property.
If present, the errors gives a short description of the cause of the error and provides tips on how to fix it. The message is not localized. Instance shows which url is used and module name shows which module inside of AI Model Deployer is used.
Note that new properties, as well as new error codes, might be added in future releases of the API.
Example of an error response
The following example shows the HTTP status code and the body of an error response:
400 Bad Request
{
"title": "Bad Request",
"status": 400,
"detail": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
"instance": "/api/v1/deployment-service/template-configurators/configuration-files",
"error Id": 1010,
"module name": "Template configurator",
"errors": "Invalid parameter [camera_driver]: camera_driver is mandatory, can not be empty.",
"advise": "please input the correct value, the camera_driver options: \"GIGE_VISION\", \"REALSENSE_D435\""
}
As the AI Model Deployer RESTful API evolves, new error codes might be added or an existing endpoint might use an error code or an HTTP status code that has not been used before. These changes are not considered as breaking changes, and API clients should handle these situations as usual. Particularly, error codes that are unknown to the API client should be treated as an unexpected error, i.e. the request should not be repeated. If the error code is unknown to the API client or the error response does not contain the error ID property, the API client MAY also optionally decide to react to the situation based on the HTTP status code only.