---
name: "mongoc_client_pool_set_error_api"
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_client_pool_set_error_api"
---

# mongoc\_client\_pool\_set\_error\_api(3)

## SYNOPSIS

```
bool
mongoc_client_pool_set_error_api (mongoc_client_pool_t *client,
                                  int32_t version);
```

Configure how the C Driver reports errors. See *Setting the Error API Version*.

## PARAMETERS

- •

  **pool**: A *mongoc\_client\_pool\_t*.

- •

  **version**: The version of the error API, either **MONGOC\_ERROR\_API\_VERSION\_LEGACY** or **MONGOC\_ERROR\_API\_VERSION\_2**.

## RETURNS

Returns true if the error API version was set, or logs an error message and returns false if **version** is invalid.

## THREAD SAFETY

This function can only be called once on a pool, and must be called before the first call to *mongoc\_client\_pool\_pop()*.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
