Error Handling
Fail gracefully and informatively
Enforceable guidelines from our catalog
External Service Calls Must Implement Production-Appropriate Timeouts
All external service calls must implement timeout configurations using HttpClient timeout settings, OkHttp timeouts, or RestTemplate timeout configurations aligned with downstream SLA requirements and upstream service capabilities to prevent cascading delays in production environments.
Timeout Values Must Be Environment-Specific and Configurable
All timeout configurations must be externalized to application.properties, application.yml, or Spring Cloud Config with different values for development, testing, and production environments to account for varying network conditions and service performance.
Retry Operations Must Use Exponential Backoff Algorithms
All retry mechanisms must implement exponential backoff algorithms using Spring Retry, Resilience4j, or custom implementations with configurable base delays, maximum delays, and retry limits to prevent overwhelming failing services during recovery.
and get unlimited access to our guidelines catalog