debugging
Status Code

DevOps vs Developer debugging responsibility matrix every cloud engineer should have in their toolkit.

Below is a complete structured table of all major HTTP status codes (1xx–5xx) divided into two key sections:


🧩 STATUS CODE TROUBLESHOOTING MATRIX

For DevOps/Cloud Engineers vs Developers (App Teams)


🛰️ SECTION 1: NETWORKING / INFRASTRUCTURE SIDE (DevOps Focus)

Status CodeMeaningLikely Root Cause (Infra/Network)Who Looks FirstCommon Fix Area
1xx (100–199)Informational responsesRarely visible; ALB or Nginx handshake infoIgnore unless misconfigured proxy
301 / 302RedirectIngress redirect (HTTP→HTTPS) misconfigured or infinite loopDevOpsCheck Ingress annotations / alb.ingress.kubernetes.io/ssl-redirect
400Bad RequestRequest blocked by WAF, malformed header, proxy issueDevOps → DeveloperCheck ALB/WAF logs; validate JSON or Content-Type
401UnauthorizedMissing/invalid authentication tokenDeveloperEnsure API key or token is passed correctly
403ForbiddenWAF rule blocking, IAM policy deny, security group blockDevOpsCheck AWS WAF logs, ALB access logs, IAM permissions
404Not FoundIngress or Service path misconfigured, or pod not exposing routeDevOpsValidate Ingress path, Service targetPort, app route
408Request TimeoutSlow backend or ALB timeoutBothIncrease ALB idle timeout, or fix app slowness
409ConflictUsually app-level (duplicate data)DeveloperHandle duplicate resource logic
429Too Many RequestsWAF rate limit, ALB throttling, API Gateway burst limitDevOpsTune WAF rate limits or backend capacity
502Bad GatewayALB cannot reach pod, Service port mismatchDevOpsCheck Service targetPort, pod logs, health checks
503Service UnavailablePod crashed, scaled to 0, or failing health checkDevOpsCheck pod readiness/liveness, replicas, ALB health
504Gateway TimeoutApp too slow or network issueDevOpsIncrease ALB timeout or app performance (from alb not able to hit the backend service. hit /helathz and check nginx reverse proxy issue. )
5xx (502–504)Infra errorAny upstream issue between ALB ↔ Ingress ↔ ServiceDevOpsNetwork route, container health, scaling issues

🧠 SECTION 2: APPLICATION SIDE (Developer Focus)

Status CodeMeaningLikely Root Cause (App/Logic)Who Looks FirstCommon Fix Area
200OKSuccess
201CreatedSuccessful POST
204No ContentSuccessful DELETE/PUT
400Bad RequestInvalid payload, JSON parse error, missing fieldsDeveloperValidate request schema, use proper error handling
401UnauthorizedToken expired or invalid credentialsDeveloperFix JWT validation or auth middleware
403ForbiddenAuthenticated but no permissionDeveloperRBAC / user access logic
404Not FoundRoute missing in code or bad URLDeveloperVerify Express routes / NestJS controllers
405Method Not AllowedRoute exists but wrong HTTP verb usedDeveloperAdd correct handler for GET/POST/PUT etc.
408Request TimeoutBackend blocking operationDeveloperOptimize query / async timeout
409ConflictResource already existsDeveloperAdd duplicate check logic
415Unsupported Media TypeWrong Content-Type headerDeveloperExpect correct application/json or multipart/form-data
422Unprocessable EntityValidation failedDeveloperAdd better validation layer (Joi, Zod, etc.)
429Too Many RequestsApp-level rate limitDeveloperTune throttling logic
500Internal Server ErrorUncaught exception / DB failureDeveloperAdd try/catch, check logs, fix runtime bug
501Not ImplementedRoute stub or missing featureDeveloperImplement missing logic
502Bad GatewayMisconfigured proxy inside appBothFix Nginx/Express reverse proxy
503Service UnavailableApp crashed or restartingBothCheck logs, crash loop, memory leaks
504Gateway TimeoutSlow DB query or async callDeveloperOptimize backend calls, use async timeouts

🧭 HOW TO TROUBLESHOOT QUICKLY

StepDevOps ChecksDeveloper Checks
1️⃣Check ALB Target Group health in AWS ConsoleCheck API endpoint in Postman
2️⃣Run kubectl get pods, kubectl describe podCheck app logs (kubectl logs <pod>)
3️⃣Validate ServicetargetPort mappingValidate routes and middleware
4️⃣Inspect Ingress annotations / DNSFix backend logic or DB access
5️⃣Review ALB/WAF logs for blocked IPsHandle exceptions & add error middleware

🧰 Typical Ownership Split

LayerOwnerExample Status CodesTools to Check
DNS / ALB / Ingress / ServiceDevOps502, 503, 504, 403AWS Console, kubectl describe ingress, ALB logs
Pod Networking / Health / ScalingDevOps503, 504kubectl get pods, metrics-server
Application Routes / DB / LogicDeveloper400, 401, 404, 500App logs, APM (Datadog, NewRelic)
Auth / Business LogicDeveloper401, 403, 409API middleware, JWT libraries

🔥 TL;DR — Quick Mapping

CategoryTypical CodesOwned By
Infra / Networking301, 302, 400, 403, 502, 503, 504DevOps
App / Logic400, 401, 404, 405, 409, 422, 500Developers