summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/db/service_entry_point_common.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp
index 91877503807..7e1209c64de 100644
--- a/src/mongo/db/service_entry_point_common.cpp
+++ b/src/mongo/db/service_entry_point_common.cpp
@@ -753,8 +753,8 @@ bool runCommandImpl(OperationContext* opCtx,
};
try {
- if (MONGO_unlikely(failWithErrorCodeInRunCommand.shouldFail())) {
- auto scoped = failWithErrorCodeInRunCommand.scoped();
+ if (auto scoped = failWithErrorCodeInRunCommand.scoped();
+ MONGO_unlikely(scoped.isActive())) {
const auto errorCode = scoped.getData()["errorCode"].numberInt();
LOGV2(21960,
"failWithErrorCodeInRunCommand enabled - failing command with error "