---
name: "mongoc_change_stream_error_document"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_change_stream_error_document"
---

# mongoc\_change\_stream\_error\_document(3)

## SYNOPSIS

```
bool
mongoc_change_stream_error_document (mongoc_change_stream_t *stream,
                                     bson_error_t *err,
                                     const bson_t **reply);
```

Checks if an error has occurred when creating or iterating over a change stream.

Similar to *mongoc\_cursor\_error\_document()* if the error has occurred client-side then the **reply** will be set to an empty BSON document. If the error occurred server-side, **reply** is set to the server's reply document.

## PARAMETERS

- •

  **stream**: A *mongoc\_change\_stream\_t*.

- •

  **err**: An optional location for a *bson\_error\_t* or **NULL**.

- •

  **reply**: A location for a *bson\_t*.

## RETURNS

A boolean indicating if there was an error.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
