Skip to content

Commit 8e3b827

Browse files
committed
fix: improve errors for childs
1 parent cd130b0 commit 8e3b827

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Job.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ export class Job<DATA = unknown | void> {
396396
this.agenda.definitions[this.attrs.name].filePath
397397
);
398398
const error = new Error(`child process exited with code: ${code}`);
399-
console.warn(error.message);
400-
reject(childError || error);
399+
console.warn(error.message, childError || this.canceled);
400+
reject(childError || this.canceled || error);
401401
} else {
402402
resolve();
403403
}

0 commit comments

Comments
 (0)