Skip to content

Commit f306c1b

Browse files
committed
CDRIVER-1551 err code for collation and old server
1 parent 307daaa commit f306c1b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/mongoc/mongoc-client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ _mongoc_client_command_with_opts (mongoc_client_t *client,
13401340
if (server_stream->sd->max_wire_version < WIRE_VERSION_COLLATION) {
13411341
bson_set_error (error,
13421342
MONGOC_ERROR_COMMAND,
1343-
MONGOC_ERROR_COMMAND_INVALID_ARG,
1343+
MONGOC_ERROR_PROTOCOL_BAD_WIRE_VERSION,
13441344
"The selected server does not support collation");
13451345
GOTO (err);
13461346
}

tests/test-mongoc-collection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2303,7 +2303,7 @@ test_count_with_collation (int wire)
23032303
ASSERT (-1 == future_get_int64_t (future));
23042304
ASSERT_ERROR_CONTAINS (error,
23052305
MONGOC_ERROR_COMMAND,
2306-
MONGOC_ERROR_COMMAND_INVALID_ARG,
2306+
MONGOC_ERROR_PROTOCOL_BAD_WIRE_VERSION,
23072307
"The selected server does not support collation");
23082308
}
23092309

0 commit comments

Comments
 (0)