> This page is for SDK, 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):`** 添加 `redact-response-body-on-error` 选项以防止原始响应体泄露到异常消息和日志中。启用时，反序列化错误异常传递 `null` 而不是原始响应体，流错误使用带有原始异常作为内部异常的固定消息，基础 API 异常类包含排除响应体的自定义 `ToString()` 覆盖。

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