Last reviewed February 25, 2026

Error Handling

Sirius Scan uses standard HTTP status codes and returns JSON error responses to indicate problems with API requests.

Error Response Format

API errors return a JSON object with an error field containing a human-readable message:

{
  "error": "description of what went wrong"
}

HTTP Status Codes

The API uses standard HTTP status codes to indicate the success or failure of requests:

Status CodeDescription
200Success
400Bad request - invalid parameters
401Unauthorized - invalid or missing API key
404Resource not found
500Internal server error

Common Error Scenarios

Authentication Errors

Returned when the X-API-Key header is missing or contains an invalid key:

{
  "error": "Invalid API key"
}

Resource Not Found

Returned when a requested host or vulnerability does not exist:

{
  "error": "Host not found"
}

Invalid Request

Returned when the request body is malformed or missing required fields:

{
  "error": "Failed to parse request body"
}

Error Handling Best Practices

  1. Always check the HTTP status code before processing the response body
  2. Parse the error field from JSON responses for user-facing messages
  3. Implement retry logic for transient errors (500, 503)
  4. Log error details for debugging

Next Steps