finally the api client checks for failure