Fix error in _callApiCurl method