fixed failing tests, added meaningfull error messages for bad API responses