Skip to content

Commit

Permalink
fix: improve errors for childs
Browse files Browse the repository at this point in the history
  • Loading branch information
simllll committed May 23, 2022
1 parent cd130b0 commit 8e3b827
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ export class Job<DATA = unknown | void> {
this.agenda.definitions[this.attrs.name].filePath
);
const error = new Error(`child process exited with code: ${code}`);
console.warn(error.message);
reject(childError || error);
console.warn(error.message, childError || this.canceled);
reject(childError || this.canceled || error);
} else {
resolve();
}
Expand Down

0 comments on commit 8e3b827

Please sign in to comment.