mongoc_error_has_label - Man Page

Synopsis

bool
mongoc_error_has_label (const bson_t *reply, const char *label);

Test whether a reply from a failed operation includes a specific error label. See Error Labels <#error-labels> for details, and see mongoc_client_session_start_transaction() <> for example code that demonstrates their use.

Parameters

Returns

Returns true if reply contains the error label.

Author

MongoDB, Inc

Info

Mar 04, 2026 2.2.3 libmongoc