unmarshalResponse masks errors that aren't in JSON format
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start in KillBillHttpClient.java, at unmarshalResponse and the catch block around the referenced line. Trace how pluginPOST handles a non-JSON response and verify the original response body remains visible instead of being replaced by a parsing error. Done when this failure path is covered and the returned error preserves the server response.
Written by the indexing model from the issue text.
Description
Particularly this error.
I am getting an error when using pluginPOST:
org.killbill.billing.client.KillBillClientException: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Invalid': was expecting 'null', 'true', 'false' or NaN
at [Source: org.jboss.netty.buffer.ChannelBufferInputStream@15590dd4; line: 1, column: 9]
at org.killbill.billing.client.KillBillHttpClient.unmarshalResponse(KillBillHttpClient.java:718)
at org.killbill.billing.client.KillBillHttpClient.deserializeResponse(KillBillHttpClient.java:648)
at org.killbill.billing.client.KillBillHttpClient.throwExceptionOnResponseError(KillBillHttpClient.java:632)
at org.killbill.billing.client.KillBillHttpClient.doPrepareRequest(KillBillHttpClient.java:503)
at org.killbill.billing.client.KillBillHttpClient.doPost(KillBillHttpClient.java:247)
at org.killbill.billing.client.KillBillHttpClient.doPost(KillBillHttpClient.java:242)
at org.killbill.billing.client.KillBillHttpClient.doPost(KillBillHttpClient.java:238)
at org.killbill.billing.client.KillBillClient.pluginPOST(KillBillClient.java:3979)
This is masking the actual error that is being returned. There should be a catch handler there somewhere to detect JsonParseExceptions and return response.getResponseBody() instead. Possibly, just add JsonParseException to the catch block on line 731 of KillBillHttpClient? I realize I could switch the DEBUG flag on, but if this is an intermittent error in production, that flag doesn't help too much.
- Dominant language
- Java
- Stars
- 35
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from killbill/killbill-client-java
-
Migrate away from Joda-Time to java.timeMay be free again @sbrossie claimed this 269 days ago, and no pull request is open. Openenhancement
killbill/killbill-client-java#144 · 1 comment · 1 assignee ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
killbill/killbill-client-java#140 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
killbill/killbill-client-java#136 · 7 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
killbill/killbill-client-java#135 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
killbill/killbill-client-java#131 · 1 comment ·
All issues in killbill/killbill-client-java
Similar issues
-
component/data-layer
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
RegistryExceptionHandler uses self-referencing basePackageClasses instead of a controller classOpenbug finsim-registry good-first-issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
? - Needs Triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
NVIDIA/cudf-spark#17063 ·
Maintainers usually reply within 2 days
-
status:pending type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100