Skip to main content

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 StatusClassificationCollection behaviourAssessment effect
403 ForbiddenPermission missingLog error, continueAffected items → data_unavailable
404 Not FoundResource not deployedLog as not_applicable, continueAffected items → not_applicable
429 Too Many RequestsAPI throttlingExponential backoff, 3 retries, then logAffected items → data_unavailable if retries exhausted
408 / TimeoutNetwork timeout30s timeout per call, log, continueAffected items → data_unavailable
500 / 503Server errorSingle retry after 5s, then logAffected 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 403 or 404 — 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
}