From 92675413f1c3b9564574dc264ffcab0d6089e70e Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Sun, 1 Sep 2019 10:36:21 +0200 Subject: [PATCH] fix: throw error messages instead of codes --- src/classes/job.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/classes/job.ts b/src/classes/job.ts index f04c1541ce..9e5bbc96c1 100644 --- a/src/classes/job.ts +++ b/src/classes/job.ts @@ -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'); } }