http-client-feign

Enforces Feign HTTP client conventions for timeouts, retries, error decoding, and idempotency.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/balajirags/aifsd-kit --skill http-client-feign-balajirags
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: http-client-feign
Source: https://github.com/balajirags/aifsd-kit/tree/main/docs/skills/http-client-feign
Command: npx skills add https://github.com/balajirags/aifsd-kit --skill http-client-feign-balajirags

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Outbound HTTP calls built on Feign often ship with no timeouts, stacked retry layers, raw FeignException leaks, and unsafe retries of non-idempotent writes, causing thread-pool exhaustion, duplicate resource creation, and leaked secrets in logs. ## Core Features & Use Cases - Resilience rules: Mandates explicit connect/read timeouts and connection pool sizing, disables Feign's built-in retryer, and centralizes retry, backoff, and circuit-breaking in Resilience4j. - Typed error handling: Requires a reusable ErrorDecoder mapping HTTP status codes to typed domain exceptions so raw FeignException never crosses the client boundary. - Safe retry and contract hygiene: Restricts automatic retries to idempotent operations or POSTs carrying an Idempotency-Key, enforces immutable DTOs with @JsonIgnoreProperties, versioned base paths, and header propagation via RequestInterceptor. - Use Case: When adding a new Catalog API client to a Spring service, apply these rules to configure timeouts, a Resilience4j wrapper, a DomainErrorDecoder, and masked logging before the client ships. ## Quick Start Review my new Feign client for the Catalog API against these conventions and fix any missing timeouts, retry misconfiguration, or error decoding gaps.

Frequently Asked Questions about http-client-feign

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure retries for a Feign client in Spring?

Disable Feign's built-in retryer with Retryer.NEVER_RETRY and centralize retry, backoff, and circuit-breaking in Resilience4j around the client call. Stacking two uncoordinated retry mechanisms multiplies load during an incident.

How do I handle Feign client errors with typed exceptions?

Implement a reusable ErrorDecoder that maps HTTP status codes to typed domain exceptions. Never let a raw FeignException propagate past the client boundary into your service layer.

When is it safe to retry a POST request automatically?

Only retry a POST automatically when it carries an Idempotency-Key that the server dedupes on. Blindly retrying a non-idempotent write after a timeout can create the resource twice.

What timeouts should a Feign client have configured?

Always set explicit connect and read timeouts plus a maximum connection pool size, such as connect=2s and read=3s. Default settings often wait indefinitely, letting a slow upstream exhaust the calling service's thread pool.

Why should Feign response DTOs use @JsonIgnoreProperties?

Marking response DTOs with @JsonIgnoreProperties(ignoreUnknown = true) prevents deserialization failures when the upstream service adds new fields. DTOs should be immutable records or builders, never JPA entities.

Is FULL logging level safe for Feign clients in production?

No, Logger.Level.FULL is a debug-only setting because it can capture tokens and PII from headers and bodies. Use BASIC in deployed environments and mask sensitive headers before logging.