Skip to content

unmarshalResponse masks errors that aren't in JSON format #65

@chris13524

Description

@chris13524

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions