Complete the code to return a human-readable error message with status 404.
return {"error": "Resource not found"}, [1]
The status code 404 means the requested resource was not found, which matches the error message.
Complete the code to send a JSON error message with status 400 for bad input.
return {"error": "Invalid input"}, [1]
Status 400 means the client sent a bad request, which fits the 'Invalid input' message.
Fix the error in the code to return a human-readable error message with status 401.
return {"error": "Unauthorized access"}, [1]
Status 401 means the user is not authorized, matching the error message.
Fill both blanks to return a JSON error message with status 500 and a message for server error.
return {"error": [1], [2]
The message 'Internal server error' matches status 500 which means server error.
Fill all three blanks to return a JSON error message with a custom message, status 403, and a retry suggestion.
return {"error": [1], "suggestion": [2], [3]
Status 403 means access is forbidden. The message and suggestion help the user understand and fix the issue.