The SysCloud API returns standard error responses to indicate when something goes wrong. These error responses provide useful information to help developers diagnose and troubleshoot issues encountered while using the API.
Error responses from the SysCloud API follow a consistent format:
HTTP Status Code: The HTTP status code indicates the outcome of the request. Common status codes for errors include 4xx Client Error and 5xx Server Error.
Error Message: A human-readable error message providing a brief description of the encountered issue.
Error Code: An error code that uniquely identifies the type of error. This code can be helpful when programmatically handling errors.
RequestId: A unique identifier for the request.
The SysCloud API may return the following common error codes:
400 Bad Request: The request was invalid or malformed. Check the request parameters and try again.
401 Unauthorized: Authentication is required to access the requested resource. Ensure you have provided valid credentials.
403 Forbidden: You are not authorized to access the requested resource. Check your permissions or credentials.
404 Not Found: The requested resource was not found. Ensure the endpoint URL is correct.
429 Too Many Requests: You have exceeded the rate limit for the requested endpoint. Wait for the rate limit window to reset before retrying.
500 Internal Server Error: An unexpected error occurred on the server side. Contact support if the issue persists.
{
"error": {
"code": "NotFound",
"message": "The given job Id was not found or is invalid",
"innerError": {
"code": "JobNotFoundError",
"request-id": "516ea792-1103-49c9-82d5-d4b682215d48",
"date": "2024-04-22T10:35:15.213Z"
}
}
}
When handling errors from the SysCloud API, consider the following best practices:
Use HTTP Status Codes: Utilize the HTTP status code to determine the nature of the error and take appropriate action in your application.
Parse Error Responses: Extract error details from the response body to provide meaningful error messages to users or to log for debugging purposes.
Implement Retry Logic: For transient errors like rate limit exceeded, implement retry logic with exponential backoff to avoid overwhelming the API.
If you encounter persistent errors or need assistance with troubleshooting issues, refer to the Support section for guidance on how to get help from our support team.