palantir / palantir/conjure-java-runtime
Servers cannot deserialize empty primitive optional values sent by Feign clients
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 95
- Forks
- 96
- Avg merge
- 3h 38m
- Merged PRs (30d)
- 33
Description
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 https://github.com/palantir/conjure-java-runtime/issues/790.
Requests with Optional<T> parameters work because Jersey will return null if an exception is thrown while deserializing an empty string.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the endpoint with an OptionalLong header and an empty value sent by a Conjure Feign client. Read Jersey's ParamConverters behavior linked in the issue and trace the server-side parameter deserialization entry point. Done means the request succeeds without a 400 or NumberFormatException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100