set cordova success, error to null