Use it when the symptom is “HTTP Error”: work through the layers in order and stop at the first one that fails.
HTTP Error
HTTP errors in automation are diagnosed from the status code plus the full request and response: 401 means authentication failed, 403 not allowed, 404 wrong path, 409/422 invalid request, 429 rate limited, and 5xx a server-side problem.
1. HTTP errors: 400/422 payload, 401/403 auth, 404 path, 409 conflict, 429 limits, 5xx server.
2. Act per class.
3. Don't retry 4xx blindly.
4. Log details.
5. Fix inputs/auth.
response status → classification → action
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
curl -sv --connect-timeout 5 --max-time 15 <url> -o /dev/nullPrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
HTTP request → proxy/redirect → server endpoint → status + headers/body → correlated server log → retry/idempotency decision → operation state → resource read-back
Healthy evidence: full request/response context and server correlation are available, status meaning is correctly classified, retries are bounded/idempotent, and ambiguous side effects are read back.
Step 2 Telling causes apart Verify boundary
Known-good is the same request returning the application-defined expected HTTP status (for example 200/204 where specified) within the timeout and the original workflow consuming the response successfully. Broken state is a repeatable unexpected status, redirect loop, gateway error or no HTTP response. An expected HTTP status shows protocol/application handling of that request at the responding hop; it does not by itself show downstream asynchronous work or target-state convergence.
Step 3 Failure modes and next checks Narrow the fault
Suspicious evidence: operators retry all 5xx blindly, treat 401/403 interchangeably, discard response bodies/request IDs, or assume a timeout means no server-side change.
Step 4 Observation-driven branch and next-check logic Narrow the fault
Run curl -sv --connect-timeout 5 --max-time 15 <url> -o /dev/null and identify whether the failure occurs before HTTP or as a returned status. For 3xx validate redirect target; 401/403 inspect auth; 404/405 inspect path/method; 408/429 inspect timeout/rate policy; 5xx correlate gateway/backend health and request ID. If a proxy returns the code, follow its correlation header/log before changing the client. If the returned status is 4xx, inspect request/authentication semantics; if it is 5xx, inspect gateway/backend health; otherwise compare a known-good endpoint on the same service to separate service-wide from resource-specific failure.
Step 5 Common mistakes Narrow the fault
- Treating all non-200 codes the same.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- 404 ≠ resource never existed; endpoint/version or authorization can affect visibility.
- 401 ≠ password specifically is wrong.
- 403 ≠ authentication failed.
- 500 ≠ retry is always safe.
curl -sS -o /dev/null -w '%{http_code}' <url>— status- Response body error details — cause
- Status-specific handling (4xx vs 5xx) — action
ReferenceWhat it is1 section · depth on demand
Core model
Capture the exact request and response safely; classify 3xx redirect, 4xx caller/contract/auth and 5xx server/upstream behavior; honor Retry-After and idempotency semantics; inspect server request IDs/logs; avoid blind retry of non-idempotent methods; verify downstream state after ambiguous responses.
ReferenceHow it works1 section · depth on demand
How it works and how it fails
HTTP Error is an application/protocol result layered above connection and TLS establishment. Status codes identify broad outcomes—client error, authentication, rate limiting, redirect or server failure—but the same code can have different owners depending on proxies, gateways and backends. The responding proxy or application owns the returned HTTP status, and the request-processing flow can traverse separate gateway and backend dependencies. curl -sv shows connection target, TLS negotiation and response status/headers, allowing the first responding hop to be distinguished from later application semantics.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
HTTP status is protocol evidence for one exchange; it does not by itself identify root cause or whether a side effect committed before an error was returned.
Method
HTTP errors in automation are diagnosed from the status code, response body and the exact request.
1. Log method, URL (without secrets), status and the response body.
2. Classify: 4xx means the request is wrong or not allowed; 5xx means the server failed.
3. For 401/403: check token validity, scopes and the identity actually used.
4. For 400/422: compare the payload with the API schema and documentation.
5. For 404: check the base URL, API version and object ID.
6. For 429/503: honour Retry-After and back off.
curl -sS -o resp.json -w '%{http_code}\n' -H "Authorization: Bearer $T" -H 'Content-Type: application/json' -X POST https://api.example.com/v1/vlans -d @payload.json
jq . resp.json
| Status | First check |
|---|---|
| 400/422 | Payload fields and types |
| 401 | Token present and not expired |
| 403 | Permissions/scopes |
| 404 | URL path, version, ID |
| 409 | Object already exists or conflicts |
| 429 | Rate limit |
| 500–504 | Server/upstream; retry later |
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Automation Troubleshooting > HTTP Error. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/azure/architecture/patterns/retry · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
HTTP Error troubleshooting proof-boundary map
Fast symptom/scope, first-failed-boundary, effective-outcome and recovery/closure map for HTTP Error.
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Symptom / scope | Time window, immutable source/run identity, effective inputs and exact targets are explicit | Floating source, changed inputs or ambiguous targets destroy reproducibility |
| First failed boundary | Transport/auth/dependency/render/operation evidence identifies the earliest divergence | Investigation starts at the final error and skips earlier unproven boundaries |
| Effective outcome | Controller result is paired with target read-back and workload/service acceptance | Green execution state or changed symptom substitutes for effective-state verification |
| Recovery / closure | Minimal change restores the original test and regression/partial-state checks are clean | Broad retry or unrelated edits make the incident non-reproducible and hide residual state |