palantir / palantir/conjure-java-runtime
Undertow endpoints cannot deserialize optional header params 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 a Conjure Undertow endpoint with an Optional<AuthHeader> header parameter. A Conjure Feign client calls this endpoint with an Optional.empty() value and receives a 400 because this parameter fails to deserialize.
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.
This request works against a Jersey service 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 tracing how Undertow deserializes an Optional header when a Conjure Feign client sends Optional.empty(), and compare that behavior with the Jersey handling linked in the issue. Check related issue 790 for context; done means the request succeeds instead of returning HTTP 400 when the optional header is empty.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100