send curl error number to callback function