Add module-level _graph_request() that wraps requests.request() with: - Up to 3 retries on HTTP 429 (rate limited) and 503 (unavailable) - Exponential backoff capped at 60 s, honouring Retry-After header - Default timeout=30 s injected via setdefault (caller can override) Wire all 13 retry-eligible API calls through _graph_request(). The 3 file-upload requests.put(data=f) calls are kept direct since an open stream cannot be re-read after the first attempt. Add 9 unit tests covering: success path, 429/503 retry, Retry-After header, max-retry exhaustion, timeout injection and override. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
110 KiB
110 KiB