More personal preference but I prefer early returns to else clauses. I would write this something like:

    if(error)
        return predicting.reject(error);
    predicting.resolve(classification.predictions);