Support error messages from the new API server

Change-Id: I43c6ad3bd89b21ea162263d11a8db22439d18ffa