You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MAX_EXPRESSION_LENGTH should not be fixed to 10000 but custom #2916
feign.template.Expressions limit of MAX_EXPRESSION_LENGTH = 10000 added by commit 8d9fe72 should be configurable to a custom value and/or being able to be disabled by setting it to 0.
I found that this exception (expression is too long. Max length: 10000) doesn't occur when using Spring Cloud OpenFeign.
That's because OpenFeign builds the RequestTemplate based on annotations, and it skips the strict validation Expressions.create() that happens when calling template.uri(...) directly in Feign core.
So even if the URI is longer than 10,000 characters, it doesn’t throw an error.
For reproduce the exception, need to use Feign core directly and create the template with new RequestTemplate().uri(...)
Thanks for the report. This project is community-maintained, and the maintainer will not implement fixes or features directly. If you want this to move forward, please open a pull request with automated tests that cover the change.
Activity
rojae commentedon Jun 23, 2025
Not sure if expressions would realistically exceed 10,000 characters,
but it's something that might be worth considering.
rojae commentedon Jun 23, 2025
I found that this exception (expression is too long. Max length: 10000) doesn't occur when using
Spring Cloud OpenFeign.That's because
OpenFeignbuilds theRequestTemplatebased on annotations, and it skips the strict validationExpressions.create()that happens when callingtemplate.uri(...)directly in Feign core.So even if the URI is longer than 10,000 characters, it doesn’t throw an error.
For reproduce the exception, need to use Feign core directly and create the template with
new RequestTemplate().uri(...)Here is reproduce code
velo commentedon Jun 4, 2026
Thanks for the report. This project is community-maintained, and the maintainer will not implement fixes or features directly. If you want this to move forward, please open a pull request with automated tests that cover the change.
Make Expressions max length configurable (OpenFeign#3422)