Skip to content

Commit 9c3d9cb

Browse files
author
Bennett Buchanan
committed
bugfix: ZENKO-621 Check redis command error
1 parent 29cc74d commit 9c3d9cb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/api/BackbeatAPI.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,11 +640,14 @@ class BackbeatAPI {
640640
return next(err);
641641
}
642642
const [cmdErr, sourceRole] = res[0];
643+
if (cmdErr) {
644+
return next(cmdErr);
645+
}
643646
// If the key did not exist, value is `null`.
644-
if (sourceRole !== null) {
647+
if (sourceRole) {
645648
entries.push(new ObjectFailureEntry(key, sourceRole));
646649
}
647-
return next(cmdErr);
650+
return next();
648651
});
649652
});
650653
}, err => {

0 commit comments

Comments
 (0)