Made handle_api_errors_for store caught exception for later inspection