Complete the code to send a 404 status code response in Express.
res.status([1]).send('Not Found');
404 is the standard status code for 'Not Found'.
Complete the code to send a JSON response with status 201 for resource creation.
res.status([1]).json({ message: 'Created' });
201 status code means a resource was successfully created.
Fix the error in the code to send a 500 Internal Server Error status.
res.status([1]).send('Internal Server Error');
500 is the correct status code for server errors.
Fill both blanks to send a 302 redirect with a Location header.
res.status([1]).set('Location', [2]).send();
302 is the status code for temporary redirect. The Location header tells where to redirect.
Fill all three blanks to send a 400 Bad Request with JSON error details.
res.status([1]).json({ error: [2], message: [3] });
400 status code means bad request. The JSON provides error type and message.
