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

## 0.40.5

**`(fix):`** Fix `error.rs` failing to compile when an error body has a property whose type is
a named (non-primitive) type or a non-string/non-u64 primitive (e.g. `i64`). Error
body fields are now deserialized with `serde_json::from_value` into their actual Rust
type (instead of always reading `as_str()`/`as_u64()`), and the crate prelude is
imported when a field references a generated type so it resolves in scope. Also fixes
a latent bug where errors sharing a status code all reused the first error's body
fields; each variant is now constructed with its own fields.

## 0.40.4

**`(fix):`** Always wrap IR-derived error fields in `Option` to match constructor code
that assigns `None` for missing fields, preventing struct/constructor type
mismatches. Fix thiserror format strings: `{{message}}` → `{message}` so
field values are actually interpolated.

**`(fix):`** Register synthesized request-envelope types for endpoints with a
referenced request body AND query parameters in the model generator's
`types/mod.rs`. Previously these types were generated but never
declared as modules, causing unresolved-type errors in the SDK crate.

## 0.40.3

**`(fix):`** Fix error field parsing to use camelCase JSON wire names matching REST conventions
(e.g. `resourceId`, `authType`, `errorId`) and derive error fields from the IR type
definition when available. Fix empty-body response handling: `parse_response` and
`parse_response_raw` now return `Ok` for empty 2xx bodies (unit/HEAD/204 responses)
and `Err` for empty 4xx/5xx bodies, preventing auth failures from being silently
swallowed on the `with_executor` path.

## 0.40.2

**`(fix):`** Change `RequestExecutor::execute` return type from `Result<Response, reqwest::Error>`
to `Result<Response, Box<dyn std::error::Error + Send + Sync>>` and add `ApiError::Executor`
variant. This allows downstream crates (e.g. CLI glue) to inject custom executor errors
without a backwards dependency on `reqwest`.