Skip to content

Commit

Permalink
fix: throw error messages instead of codes
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Sep 1, 2019
1 parent 69bd8d1 commit 9267541
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/classes/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,9 @@ export class Job {
if (result === 1) {
return;
} else if (result === RetryErrors.JobNotExist) {
throw RetryErrors.JobNotExist;
throw new Error('Retried job not exist');
} else if (result === RetryErrors.JobNotFailed) {
throw RetryErrors.JobNotFailed;
} else if (result === RetryErrors.JobIsActive) {
throw RetryErrors.JobIsActive;
throw new Error('Retried job not failed');
}
}

Expand Down

0 comments on commit 9267541

Please sign in to comment.