> This page is for SDKs, version Legacy.
> For other versions, use one of these documentation indexes:
> - Current (default): https://buildwithfern.com/learn/sdks/current/llms.txt
> - Legacy: https://buildwithfern.com/learn/sdks/legacy/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## 2.22.0

**`(feat):`** Add `redact-response-body-on-error` option to prevent raw response bodies from leaking into exception messages and logs. When enabled, deserialization error exceptions pass `null` instead of the raw response body, streaming errors use a fixed message with the original exception as an inner exception, and the base API exception class includes a custom `ToString()` override that excludes the response body.

```yaml
generators:
  - name: fernapi/fern-csharp-sdk
    config:
      redact-response-body-on-error: true
```