palantir / palantir/conjure-java
[http-remoting] Serialize Conjure error parameters to JSON rather than with Objects.toString()
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 39
- Forks
- 49
- Avg merge
- 8h 22m
- Merged PRs (30d)
- 32
Description
Currently in Java implementation error parameters are serialized with Objects.toString() (see SerializableError.forException(ServiceException exception)).
This leads to different formatting of the same error depending on the language used for the error implementation.
I suggest serializing parameters (safe/unsafe error arguments) as JSON - this representation is consistent across languages because parameters are Conjure types.
This way it is also possible to deserialize parameter back into proper Conjure type.
Posting here given this should be expected behavior for all Conjure implementation.
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 at SerializableError.forException(ServiceException exception), where the Java implementation currently serializes safe and unsafe error arguments with Objects.toString(). Trace how these parameters are represented by the HTTP remoting implementation and identify the relevant tests. Done means parameters use consistent JSON representation and can be deserialized back into their Conjure types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100