Skip to content

Conversation

@NiMv1
Copy link

@NiMv1 NiMv1 commented Dec 18, 2025

Summary

This PR adds a methodKey field to RetryableException to allow better identification of which Feign method is being retried.

Motivation

Fixes #2250

As mentioned in the issue, the ErrorDecoder receives methodKey as a parameter, but when creating a RetryableException, this information is lost. This makes it difficult for Retryer implementations to identify exactly which method is being retried.

Changes

  1. Added methodKey field to RetryableException
  2. Added new constructor that accepts methodKey parameter
  3. Added methodKey() getter method
  4. Updated ErrorDecoder.Default to pass methodKey when creating RetryableException
  5. Added unit tests for the new functionality

Backward Compatibility

  • All existing constructors remain unchanged and set methodKey to
    ull
  • The serialVersionUID was incremented from 2L to 3L due to the new field
  • Existing code will continue to work without modification

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.

RetryableException should hold the methodKey as well

1 participant