When processing a job, I sometimes want to both update the job and cancel it - such as setting a code indicating the reason for cancellation. The code for this tends to look like this:
job.cancelReson = Cancellation.USER;
job.update();
const error = new JobError('canceled');
error.cancelJob = true;
next(error);
However, presumably the 'next' method is going to mutate the job record. It would be convenient to be able to do both in a single database update.
My proposal would be that passing both parameters (error and job) to next() would accomplish this.