Added defferred object and added it to ApiClient error handling.