Updated the error message to respond with status: 404 instead of fail.