Updated error messages and status code based on bug fixes