OpenFeign / OpenFeign/feign

Getting java.util.regex.PatternSyntaxException: Illegal repetition whenever I am trying to pass nested json string in my request header

Open
#1,231 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feedback provided
Dominant language
Java
Stars
9.8k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
41

Description

I am using open feign to communicate to rest endpoints from a spring boot application.
In the feign client declaration I am using spring web annotation such as @RequestHeader and @GetMapping. Now in the param which is annotated with @RequestHeader, if i pass one level json String like {"attr1": "value1" , "attr2" : "value2"} the rest calls flows to the target application. But if I pass any nested json like {"attr1": {"attr2" : "value2"}} , the code fails with the below error

Getting java.util.regex.PatternSyntaxException: Illegal repetition.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Feign client declaration and the @RequestHeader parameter handling described in the issue, then reproduce the request with a nested JSON string. Done means the nested value no longer causes PatternSyntaxException and the REST call reaches the target application.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.