Skip to content

Commit d4b2906

Browse files
author
Christian Hergert
committed
cluster: set an error message if we failed.
1 parent 991ae7e commit d4b2906

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mongoc/mongoc-cluster.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,10 @@ _mongoc_cluster_run_command (mongoc_cluster_t *cluster,
912912

913913
if (reply) {
914914
if (!_mongoc_rpc_reply_get_first(&rpc.reply, &reply_local)) {
915+
bson_set_error (error,
916+
MONGOC_ERROR_BSON,
917+
MONGOC_ERROR_BSON_INVALID,
918+
"Failed to decode reply BSON document.");
915919
GOTO(failure);
916920
}
917921
bson_copy_to(&reply_local, reply);

0 commit comments

Comments
 (0)