Crm 12737: curl error better handling on class.api.php