API Fundamentals
/Beginner
4xx Client Errors
Definition
HTTP status codes ranging from 400-499. They indicate that the CLIENT (the frontend app, the user, the browser) did something wrong. The request contained bad syntax, unauthorized credentials, or asked for something that doesn't exist.
Explain Like I'm New
The server saying: 'You messed up. I cannot process this because you sent me garbage, you aren't logged in, or you are looking for a ghost.'
Real World Example
Typing a URL that doesn't exist (`404 Not Found`). Forgetting to type your password when logging in (`400 Bad Request`). Trying to access an admin panel as a standard user (`403 Forbidden`).
Common Use Cases
- •Form validation
- •Authentication failures
- •API error handling
Interactive Example
Loading...
Console output will appear here...
Interview Questions
basic
- Who is at fault when a 4xx error occurs: The Frontend Developer or the Backend Developer?
intermediate
- What is the exact difference between `401 Unauthorized` and `403 Forbidden`?