Skip to main content

HTTP Status Codes

Learn HTTP Status Codes (REST API Development, Spring Boot) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

The Number Tells the Client What Happened Every HTTP response starts with a three-digit status code. The first digit is the family, and a client can act on the family even if it has never seen the exact code. The 4xx / 5xx split is not cosmetic. Monitoring alerts on 5xx (your bug, wake someone up) and ignores most 4xx (the caller's mistake). If you return 500 for a missing record you page the on-call engineer for nothing; if you return 200 for a failure nobody is paged at all.

More lessons in REST API Development