MONGOC_CHANGE...ERROR_DOCUMENT(3)
π¦ MONGOC_CHANGE...ERROR_DOCUMENT(3) π¦
okay bestie so this one lives in the libmongoc house π and it's the little function that goes "hey... did something go wrong in there?" for your change streams. no cap, it's lowkey the vibe check of the change-stream world π
β¨ SYNOPSIS β¨
bool
mongoc_change_stream_error_document (mongoc_change_stream_t *stream,
bson_error_t *err,
const bson_t **reply);
πΈ DESCRIPTION πΈ
So the way this works is: it checks if an error has occurred when creating or iterating over a change stream. That's the whole job, and it eats every time π
It's similar to mongoc_cursor_error_document() β like, the same energy, different function, iykyk.
Here's the tea on how reply gets set π΅:
- If the error has occurred client-side, then
replywill be set to an empty BSON document. Literally nothing in there. an empty little guy π«Ά - If the error occurred server-side,
replyis set to the server's reply document. so you actually get the receipts π₯
π PARAMETERS π
streamβ Amongoc_change_stream_t. your change stream bestie, the main character β¨errβ An optional location for abson_error_t, orNULL. it's optional fr fr, you can absolutely passNULLhere if you're built different πreplyβ A location for abson_t. this is where the reply document gets dropped off π
β RETURNS β
A boolean indicating if there was an error.
like, true = something went sideways π, false = we're so back π. simple as that, periodt.
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
okay that's the whole page, you ate that π version 2.5.6, dated Oct 09, 2026 β go forth and error-check your change streams, icon π π§π
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms