Skip to content

Commit

Permalink
refactor error message
Browse files Browse the repository at this point in the history
  • Loading branch information
NickOvt committed Oct 4, 2024
1 parent be09d0c commit 73e42c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Sender extends EventEmitter {

get: async domain => {
if (!db.redis) {
return { enabled: false, error: 'Redis connection error' }; // if no redis return that MTA-STS is disabled
return { enabled: false, error: { message: 'Redis connection error' } }; // if no redis return that MTA-STS is disabled
}
try {
let json = await db.redis.get(`sts:${domain}`);
Expand All @@ -123,7 +123,7 @@ class Sender extends EventEmitter {
}
} catch (err) {
log.error(this.logName + '/MTA-STS', 'Redis error domain=%s err=%s', domain, err.message);
return { enabled: false, error: 'Redis request and connection error' }; // If redis error return MTA-STS is disabled
return { enabled: false, error: { message: 'Redis request and connection error' } }; // If redis error return MTA-STS is disabled
}
}
},
Expand Down

0 comments on commit 73e42c9

Please sign in to comment.