Recall & Review
beginner
What does HTTP status code 200 mean?
Status code 200 means OK. It indicates that the request was successful and the server returned the requested data.
Click to reveal answer
beginner
When should you use status code 404 in Express?
Use status code 404 to indicate Not Found. It means the requested resource does not exist on the server.
Click to reveal answer
beginner
What is the meaning of status code 500 in Express?
Status code 500 means Internal Server Error. It signals that something went wrong on the server while processing the request.
Click to reveal answer
intermediate
Why use status code 201 after creating a resource?
Status code 201 means Created. It tells the client that a new resource was successfully created on the server.
Click to reveal answer
beginner
What does status code 400 indicate in an Express app?
Status code 400 means Bad Request. It shows that the client sent invalid or malformed data that the server cannot process.
Click to reveal answer
Which status code should you send when a user tries to access a page that does not exist?
✗ Incorrect
404 means Not Found, used when the requested resource is missing.
What status code indicates a successful GET request?
✗ Incorrect
200 means OK, used for successful requests like GET.
If the server encounters an unexpected error, which status code should it return?
✗ Incorrect
500 means Internal Server Error, used for server-side problems.
Which status code is appropriate after successfully creating a new user?
✗ Incorrect
201 means Created, used after a resource is successfully created.
What status code should be sent if the client sends invalid data?
✗ Incorrect
400 means Bad Request, indicating client sent invalid data.
Explain the purpose of HTTP status codes in Express and give examples of when to use 200, 201, 400, 404, and 500.
Think about how the server tells the client what happened with their request.
You got /6 concepts.
Describe how you would handle errors in an Express app using status codes.
Focus on matching error situations to correct status codes.
You got /4 concepts.