Skip to content

feat: add AutoCloseable support and configurable retry backoff to clients - #27

Open
fern-api[bot] wants to merge 3 commits into
mainfrom
fern-bot/2026-06-10_12-30-03_692
Open

fern-api[bot] wants to merge 3 commits into
mainfrom
fern-bot/2026-06-10_12-30-03_692

Conversation

@fern-api

@fern-api fern-api Bot commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

3.0.0 → 3.1.0

Added

  • NewscatcherApiClient / AsyncNewscatcherApiClient — both now implement AutoCloseable, enabling safe use in try-with-resources blocks.
  • ClientOptions.close() and ClientOptions.isClosed() — explicit lifecycle management that shuts down the OkHttpClient dispatcher, connection pool, and any tracked WebSocket clients.
  • RequestOptions.Builder.maxRetries(Integer) — overrides the client-wide retry count for a single request across all resource clients (sync and async).
  • initialRetryDelayMillis(), maxRetryDelayMillis(), and retryJitterFactor() — new builder methods on NewscatcherApiClientBuilder, AsyncNewscatcherApiClientBuilder, and ClientOptions.Builder for fine-grained exponential backoff control.
  • ResponseDecompressionInterceptor — transparently decompresses gzip- and deflate-encoded response bodies, including responses to requests with an explicit Accept-Encoding header.

Fixed

  • setAuthentication() — no longer sends a null x-api-token header when apiKey is null in both builder classes.
  • DateTimeDeserializer — now falls back to space-separated ISO 8601 and RFC 1123 date formats when standard ISO 8601 parsing fails.
  • RetryInterceptor — response bodies are buffered before retry, call timeouts are suspended during backoff sleeps, and transport errors during retry no longer discard the last successful response.
  • Deserialization error surfacing — all sync and async resource clients now catch JsonProcessingException and throw a descriptive NewscatcherApiException instead of routing failures through the generic error handler.

See full changelog

@fern-api fern-api Bot changed the title SDK regeneration fix: handle space-separated datetime strings in DateTimeDeserializer Jun 24, 2026
@fern-api
fern-api Bot force-pushed the fern-bot/2026-06-10_12-30-03_692 branch from 16a5786 to 09895f5 Compare June 24, 2026 15:57
@fern-api fern-api Bot changed the title fix: handle space-separated datetime strings in DateTimeDeserializer feat: add per-request retry override and expand date-time parsing Jul 8, 2026
@fern-api
fern-api Bot force-pushed the fern-bot/2026-06-10_12-30-03_692 branch from 09895f5 to 0883c08 Compare July 8, 2026 09:49
@fern-api fern-api Bot changed the title feat: add per-request retry override and expand date-time parsing feat: add configurable retry backoff options to client builders Aug 4, 2026
@fern-api
fern-api Bot force-pushed the fern-bot/2026-06-10_12-30-03_692 branch from 0883c08 to 027d024 Compare August 4, 2026 12:16
fern-api Bot added 3 commits September 30, 2026 10:10
Generated by Fern
CLI Version: unknown
Generators:
  - fernapi/fern-java-sdk: 4.23.1
…etry backoff to clients

Both `NewscatcherApiClient` and `AsyncNewscatcherApiClient` now implement
`AutoCloseable`, enabling use in try-with-resources blocks for proper
resource cleanup. The builder classes gain three new optional methods for
fine-grained control over exponential backoff retry behavior. Javadoc
deduplication across all builder types is also included.

Key changes:
- `NewscatcherApiClient` and `AsyncNewscatcherApiClient` implement `AutoCloseable` with a `close()` method that shuts down the SDK-owned HTTP client
- `NewscatcherApiClientBuilder` and `AsyncNewscatcherApiClientBuilder` add `initialRetryDelayMillis()`, `maxRetryDelayMillis()`, and `retryJitterFactor()` builder methods
- `setAuthentication()` now guards against a null `apiKey` before adding the `x-api-token` header
- Duplicate Javadoc `<p>` tags removed from builder methods across all response/entity types

🌿 Generated with Fern
@fern-api fern-api Bot changed the title feat: add configurable retry backoff options to client builders feat: add AutoCloseable support and configurable retry backoff to clients Sep 30, 2026
@fern-api
fern-api Bot force-pushed the fern-bot/2026-06-10_12-30-03_692 branch from 027d024 to 6336d46 Compare September 30, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants