> 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.

## 1.38.1

**`(fix):`** Fix paginated results silently skipping records. Every `each`/`map`/`to_a`/`first`/`any?`/`count`
over a pager (or its `pages`) now starts again from the first page, reading `pages` no longer
moves item iteration forward, items are no longer removed from fetched pages as they are read,
and `each` without a block returns an `Enumerator`. Manual `next_element`/`next_page` loops,
including retrying after a failed page, behave as before. Because each loop starts again,
reading the same pager more than once (or reading both `pages` and items) requests the pages
again, except a first page kept by `load_first_page` (or `fetchFirstPageOnCall`), which every
loop reuses.

## 1.38.0

**`(fix):`** Cursor and offset paginated methods now document what they return. The YARD `@return` tag and
the `reference.md` signature name the `CursorItemIterator` / `OffsetItemIterator` instead of the
response type, the method docs say which items it yields, that `pages` gives each page's full
response, and when the request is sent and API errors are raised. The README pagination example
uses a paginated endpoint even when the default endpoint is not paginated, and shows `pages`
instead of the nonexistent `results` method. Iterators gain `load_first_page`, which sends the
first request immediately so its API error is raised at that call.

**`(feat):`** Add opt-in `fetchFirstPageOnCall` config. When enabled, cursor and offset paginated methods send
the request for the first page before returning the iterator, so an API error for that page is
raised by the method call, as in non-paginated methods. Disabled by default because existing
callers may rescue errors around the loop, or build an iterator without iterating it.

## 1.37.3

**`(fix):`** Connection-level failures now raise the SDK's new `Errors::ConnectionError` (a subclass of
`Errors::ApiError`) instead of leaking raw `Errno::ECONNREFUSED`, `Errno::ECONNRESET`,
`EOFError`, `SocketError` (DNS) or `OpenSSL::SSL::SSLError`, so `rescue Errors::ApiError`
catches every failed call as the README documents. The original exception is kept as `cause`.
`Errno::ETIMEDOUT` now raises `Errors::TimeoutError` like the other socket timeouts.
Other `SystemCallError`s (e.g. file errors) are not wrapped. Code that rescued the wrapped classes
directly should rescue `Errors::ConnectionError` instead (or inspect `cause`). Transport failures are still not retried. The README errors example shows the new class.

## 1.37.2

**`(fix):`** Parsing an XML (TwiML) element without a text property keeps the text before its first child in the
ordered content, so `Gather.from_xml('<Gather>Press a key, then <Say>one</Say></Gather>')` round-trips
instead of dropping `Press a key, then `. Types with a text property (e.g. `Say`) are unchanged: that
text is still the property's value.