⚠️ Coming Soon: Standardized error handling is currently under development and will be available before the v1.0 release. The current API implementation returns basic error messages.
Sirius Scan will implement a comprehensive error handling system. This documentation outlines the planned error handling that will be implemented before the v1.0 release.
The upcoming error handling system will provide:
We recommend following this documentation's structure to prepare for the error handling system's release. Subscribe to our release notifications to be informed when standardized error handling becomes available.
The API currently provides basic error responses during the development phase. This means:
All API errors will follow this consistent JSON format:
{
"error": {
"code": "error_code",
"message": "Human readable message",
"details": {
"additional": "context about the error"
}
}
}
The API will use standard HTTP status codes to indicate the success or failure of requests:
Status Code | Description |
---|---|
200 | Success |
201 | Resource created |
400 | Bad request - invalid parameters |
401 | Unauthorized - invalid or missing API key |
403 | Forbidden - insufficient permissions |
404 | Resource not found |
409 | Conflict - resource already exists |
422 | Validation error |
429 | Too many requests - rate limit exceeded |
500 | Internal server error |
503 | Service unavailable |
{
"error": {
"code": "invalid_api_key",
"message": "The provided API key is invalid or has expired",
"details": {
"key_id": "abc123"
}
}
}
{
"error": {
"code": "validation_error",
"message": "The request parameters are invalid",
"details": {
"fields": {
"ip": "Invalid IP address format",
"scan_type": "Must be one of: quick, full, custom"
}
}
}
}
{
"error": {
"code": "resource_not_found",
"message": "The requested host was not found",
"details": {
"resource_type": "host",
"resource_id": "192.168.1.1"
}
}
}
When the standardized error handling is implemented, we recommend:
Rate limiting will be implemented with the following headers:
X-RateLimit-Limit
: Total requests allowed per windowX-RateLimit-Remaining
: Remaining requests in current windowX-RateLimit-Reset
: Time when the rate limit resetsRetry-After
: Seconds to wait when rate limitedExample rate limit error:
{
"error": {
"code": "rate_limit_exceeded",
"message": "API rate limit exceeded",
"details": {
"limit": 100,
"reset_at": "2024-03-29T12:00:00Z"
}
}
}