Skip to content

Commit

Permalink
#984: removed error variable
Browse files Browse the repository at this point in the history
  • Loading branch information
phjulia committed Aug 21, 2023
1 parent 556d256 commit 1d30d9e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/metadataTypes/Automation.js
Original file line number Diff line number Diff line change
Expand Up @@ -987,11 +987,11 @@ class Automation extends MetadataType {
return 'OK';
}
} catch (ex) {
let error = `Error updating notifications for automation '${key}': ${ex.message} (${ex.code})).`;
ex.code === 'ERR_BAD_REQUEST'
? (error += 'Make sure that the email address is correct.')
: '';
Util.logger.error(error);
Util.logger.error(
ex.code === 'ERR_BAD_REQUEST'
? `Error updating notifications for automation ${key}: ${ex.message} (${ex.code})). Make sure that the email address is correct.`
: `Error updating notifications for automation '${key}': ${ex.message} (${ex.code})).`
);
return 'Error';
}
}
Expand Down

0 comments on commit 1d30d9e

Please sign in to comment.