Errors and Troubleshooting

Error responses from the API generally use standard HTTP status codes. Some examples:

Status Code Status Message Meaning
200 OK All looks good
400 Bad Request Request was invalid
401 Unauthorized Authentication missing or incorrect
403 Forbidden Request was understood but not allowed
404 Not Found Resource not found
406 Not acceptable Invalid Parameter requested
429 Rate Limit Exceeded Rate limit of requests exceeded
500 Internal Server Error Something wrong with the server
503 Service Unavailable Server is unable to complete request

If the response code is not specific enough to determine the cause of the issue, error messages will be included in the response in JSON format, for example; in the below 406 error it indicates what were the invalid parameters:

{
   "errorCode" : "INVALID_PAGEINDEX",
   "errorMessage" : "Incorrect page index value"
}

Error Handling

The API will raise exceptions in the event something failed, such as missing or invalid parameters. We recommend writing code that gracefully handles all possible API exceptions.

404 Error Messages

{
   "errorCode" : "NO_DATA_FOUND",
   "errorMessage" : "No data found"
}
{
  "errorCode": "ADVISORYID_NOT_FOUND",
  "errorMessage": "Advisory-id not found"
}
{
  "errorCode": "NO_DATA_FOUND",
  "errorMessage": "CVE_ID not found"
}
{
    "errorCode": "PRODUCT_NOT_FOUND",
    "errorMessage": "Product not found"
}
{
    "errorCode": "VERSION_ID_IS_MANDATORY",
    "errorMessage": "Version ID is mandatory"
}
{
    "errorCode": "NO_DATA_FOUND",
    "errorMessage": " No advisories found"
}
{
    "errorCode": "OS_TYPE_NOT_FOUND",
    "errorMessage": "OS Type is mandatory"
}

406 Error Nessages

Below are returned 406 errors with additional information to identify the cause.

{
   "errorCode" : "INVALID_PAGEINDEX",
   "errorMessage" : "Incorrect page index value"
}
{
   "errorCode" : "MIN_PAGESIZE , MAX_PAGESIZE",
   "errorMessage" : "Minimum page size value = 1 and Maximum page size = 100"
}
{
   "errorCode" : "INVALID_DATE_FORMAT",
   "errorMessage" : "Invalid date format, please enter date in yyyy-mm-dd format"
}
{
    "errorCode": "START_DATE_GREATER",
    "errorMessage": "Start date should not be greater than end date"
}
{
   "errorCode" : "START_DATE_AND_END_DATE_MANDATORY",
   "errorMessage" : "Start Date and End Date are mandatory"
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <advisory>
    <errorCode>INVALID_EXTENSION</errorCode>
    <errorMessage>Not supported extension type. Supported extension types are .json and .xml</errorMessage>
  </advisory>
{
  "errorCode": "INVALID_ADV_COUNT",
  "errorMessage": "Invalid advisories count"
}
{
   "errorCode" : "INVALID_SEVERITY",
   "errorMessage" : "Invalid Severity. Supported severities are critical, high, medium, low and informational"
}
{
    "errorCode": "INVALID_PRODUCT_NAME_FORMAT",
    "errorMessage": "Invalid product name format, Special characters are not allowed (&,!,$,',@,#,!,<,?). Valid example's e.g 'cisco' ,'cisco_xe' ,'cisco-xe*' etc"
}
{
  "errorCode": "INVALID_YEAR",
  "errorMessage": "Year should be in range 1995 to current year"
}
{
    "errorCode": "INVALID_XXX_VERSION",
    "errorMessage": "XXX version not found"
}
{
    "errorCode": "INVALID_PLATFORM_ALIAS",
    "errorMessage": "Invalid platform alias"
}
{
   "errorCode" : "INVALID_OS_TYPE",
   "errorMessage" : "OS Type is Invalid"
}