1MONGOC_ERROR_HAS_LABEL(3) libmongoc MONGOC_ERROR_HAS_LABEL(3)
2
3
4
6 mongoc_error_has_label - mongoc_error_has_label()
7
9 bool
10 mongoc_error_has_label (const bson_t *reply, const char *label);
11
12 Test whether a reply from a failed operation includes a specific error
13 label. See Error Labels for details, and see mongoc_client_ses‐
14 sion_start_transaction for example code that demonstrates their use.
15
17 • reply: A bson_t, the reply to a failed operation.
18
19 • label: The label to test for, such as "TransientTransactionError" or
20 "UnknownTransactionCommitResult".
21
23 Returns true if reply contains the error label.
24
26 MongoDB, Inc
27
29 2017-present, MongoDB, Inc
30
31
32
33
341.20.0 Nov 18, 2021 MONGOC_ERROR_HAS_LABEL(3)