Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
khauser opened this issue Jul 19, 2024 · 1 comment
Open

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

khauser opened this issue Jul 19, 2024 · 1 comment
Labels
spring-cloud Issues related to Spring Cloud OpenFeign waiting for feedback Issues waiting for a response from either to the author or other maintainers

Comments

@khauser
Copy link

khauser commented Jul 19, 2024

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.

@kdavisk6
Copy link
Member

Without more information, and possible a minimal reproducible example, I'm not sure where to begin.

The exception you are seeing is part of the general RuntimeException handling and appears to indicate a NullPointerException during decoding. Given that Spring is involved here, I recommend first looking into your Decoder configuration and try working backwards into Feign.

If you find that there's an issue in Feign itself, please provide that feedback in this issue.

@kdavisk6 kdavisk6 added waiting for feedback Issues waiting for a response from either to the author or other maintainers spring-cloud Issues related to Spring Cloud OpenFeign labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spring-cloud Issues related to Spring Cloud OpenFeign waiting for feedback Issues waiting for a response from either to the author or other maintainers
Projects
None yet
Development

No branches or pull requests

2 participants