Skip to content

Servers cannot deserialize empty primitive optional values sent by Feign clients #1331

@pkoenig10

Description

@pkoenig10

What happened?

A service is exposing an endpoint with an OptionalLong header parameter. A Conjure Feign client calls this endpoint with an OptionalLong.empty() value and receives a 400 because this parameter fails to deserialize with NumberFormatException.

What did you want to happen?

The request from the client should have succeeded.

Details

This is related to #790.

Requests with Optional<T> parameters work because Jersey will return null if an exception is thrown while deserializing an empty string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions