0
0
Expressframework~5 mins

Status code conventions in Express - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
A500
B200
C404
D201
What status code indicates a successful GET request?
A200
B400
C201
D500
If the server encounters an unexpected error, which status code should it return?
A400
B500
C404
D201
Which status code is appropriate after successfully creating a new user?
A200
B404
C400
D201
What status code should be sent if the client sends invalid data?
A400
B200
C404
D500
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.