palantir / palantir/conjure-java
[FR] Support custom exception mappers in conjure-undertow-annotations
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 39
- Forks
- 49
- Avg merge
- 8h 22m
- Merged PRs (30d)
- 32
Description
What happened?
I am trying to make use of conjure-undertow-annotations and need exceptions to be mapped in a specific format so that it can interface with third-party code.
That format unfortunately doesn't fit the SerializableError format.
Our solution for now is to catch such errors, have our undertow interface return a union of error/response and custom-serialize that, but that feels non-ideal.
What did you want to happen?
Ideally, we would be able to indicate a custom exception serializer in the @Handle annotation (which seems to be mentioned as a TODO there)
Contributor guide
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 with conjure-undertow-annotations/src/main/java/com/palantir/conjure/java/undertow/annotations/Handle.java, especially the TODO referenced in the issue, and review the SerializableError format it links to. Determine the annotation and exception-mapping behavior needed for custom serialization; done means callers can request a non-SerializableError response format through @Handle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100