error codes
So until yesterday, if I got an error code on a website, I would have lurked on Twitter for someone to explain to me. Now however, I am an error code connoisseur and may start posting my own error code takes.
It's good timing learning this considering all the outages we've had lately. I covered API gateways today for my AWS exam and had to learn about these codes. To give an overview, if it's a 4XX error, this means it was a client-side error but if 5XX, this means it's the server side.
For 4XX, we have:
- 400 = bad request, invalid i.e. if wrong format to the API
- 403 = access denied i.e. missing auth or validation/API key
- 429 = throttling which happens if many requests
For 5XX, we have:
- 500 = internal service error
- 502 = bad gateway which means backend sent wrong response
- 503 = service unavailable
- 504 = timeout i.e. in API gateway, you will timeout after 29 seconds