Updated error codes based on API changes