How are failure states handled? Is an apipie exception thrown or should we check the response?