Learn how to resolve technical hurdles — diagnose errors, debug request failures, and monitor system status in real-time.
Most production issues fall into auth, payload size, upstream limits, or network timeouts. Work top-down: status code → headers → body → retry behavior.
# 1) Confirm the key works
curl -i https://api.example.com/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"
# 2) Reproduce with a minimal payload
# 3) Compare against a known-good request
Timeouts can come from network issues, upstream throttling, or very large payloads. Check request size, client timeout, retry strategy, and system status.
Tags: Timeout
For interactive chat, start around 30–60s. For long jobs, prefer async patterns instead of holding an HTTP connection open.
Use exponential backoff with jitter. Do not retry non-idempotent writes blindly; retry 408 / 429 / 5xx with a capped attempt count.
Compare request headers, verify the model name, and read the error code / message. Log a correlation ID when the API returns one.
Tags: Debugging
| Status | Meaning | First action |
|---|---|---|
401 |
Unauthorized | Check / rotate API key |
403 |
Forbidden | Check scopes / IP allowlist |
429 |
Rate limited | Back off, then retry |
500 |
Server error | Retry with jitter |
Check the public status page and compare the same request from another network. If only one region fails, capture timestamps for support.
Never log raw API keys or full end-user prompts if policy forbids it.