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
14 mongoc_client_session_start_transaction() for example code that demon‐
15 strates their use.
16
18 • reply: A bson_t, the reply to a failed operation.
19
20 • label: The label to test for, such as "TransientTransactionError" or
21 "UnknownTransactionCommitResult".
22
24 Returns true if reply contains the error label.
25
27 MongoDB, Inc
28
30 2017-present, MongoDB, Inc
31
32
33
34
351.24.3 Aug 17, 2023 MONGOC_ERROR_HAS_LABEL(3)