palantir / palantir/conjure-java-runtime

Undertow endpoints cannot deserialize optional header params sent by Feign clients

Open
#1,330 4 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.