Skip to content

Commit a7fd40e

Browse files
committed
Append a "host" attribute to error responses
1 parent 20ed5d5 commit a7fd40e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/mongo/db/service_entry_point_common.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ void generateErrorResponse(OperationContext* opCtx,
214214
// so we need to reset it to a clean state just to be sure.
215215
replyBuilder->reset();
216216
replyBuilder->setCommandReply(exception.toStatus(), extraFields);
217+
replyBuilder->getBodyBuilder().append("host", getHostNameCachedAndPort());
217218
replyBuilder->getBodyBuilder().appendElements(replyMetadata);
218219
}
219220

0 commit comments

Comments
 (0)