Error Handling
The Data Collector never aborts. Every API call failure is caught, classified, and written to the collection_errors array in the output JSON. Collection continues regardless of individual failures.
Error Classification
| HTTP Status | Classification | Collection behaviour | Assessment effect |
|---|---|---|---|
| 403 Forbidden | Permission missing | Log error, continue | Affected items → data_unavailable |
| 404 Not Found | Resource not deployed | Log as not_applicable, continue | Affected items → not_applicable |
| 429 Too Many Requests | API throttling | Exponential backoff, 3 retries, then log | Affected items → data_unavailable if retries exhausted |
| 408 / Timeout | Network timeout | 30s timeout per call, log, continue | Affected items → data_unavailable |
| 500 / 503 | Server error | Single retry after 5s, then log | Affected items → data_unavailable |
Retry Policy
- Maximum retries per call: 3
- Backoff strategy: exponential with jitter — base 1s, max 16s
- Retry applies to:
429,500,503, timeout - No retry on
403or404— these are deterministic
collection_errors Schema
{
"phase": "rest",
"call": "GET /subscriptions/{id}/providers/Microsoft.Security/assessments",
"subscription_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"http_status": 403,
"error_code": "AuthorizationFailed",
"message": "The client does not have authorization...",
"timestamp": "2026-03-17T14:23:01Z",
"retry_count": 0
}