OpenFeign / OpenFeign/feign

DecodeException on Map<String, List<String>> result

Open
#2,480 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

spring-cloud waiting for feedback
Dominant language
Java
Stars
9.8k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
41

Description

Hi,

I do have this REST-Resource in my project:

    @GetMapping(ASYNC_MESSAGE + MULTI + KEY_VAR)
    Map<String, List<String>> getNextMessages(@PathVariable(KEY) String[] keys, @RequestParam(LIMIT) Integer limit);

A call on the resources results in an exception:

Sch-Pool4","level":"ERROR","level_value":40000,"stack_trace":"feign.codec.DecodeException: null
\tat feign.InvocationContext.decode(InvocationContext.java:118)
\tat feign.InvocationContext.proceed(InvocationContext.java:88)
\tat feign.ResponseHandler.handleResponse(ResponseHandler.java:63)
\tat feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:114)
\tat feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:70)
\tat feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:99)
\tat jdk.proxy3/jdk.proxy3.$Proxy227.getNextMessages(Unknown Source)

If I execute the call manually I get:

{
    "TS_start_queue": []
}

What could be the reason for this? There are no specialites in my environment with spring boot 3.2.7 and spring cloud 2023.0.2.

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 declared getNextMessages return type and the JSON response, then trace decoding through feign.InvocationContext.decode, ResponseHandler.handleResponse, and SynchronousMethodHandler.executeAndDecode. A useful outcome is a reproducible explanation of the DecodeException and a regression test or clearly identified missing test case.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.