Skip to content

Why Feign return empties/null on HTTP 404 response? #476

@thusithathilina

Description

@thusithathilina

This is related to coveooss/feign-error-decoder#1
I tried this with for exception which is thrown with the HTTP 404. In that case, I'm not getting the intended exception to the client.
I checked the code and https://github.com/OpenFeign/feign/blob/master/core/src/main/java/feign/Util.java#L233 always returns null since https://github.com/OpenFeign/feign/blob/master/jackson/src/main/java/feign/jackson/JacksonDecoder.java#L52 when the status code is 404.
But 404 response can contain a body. Therefore, in my opinion, that should be handled similarly to other status codes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions