You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Java client throws IOException for 201 responses due to missing body #136
This results in an IOException, as there is no response body. Running the code again results in a 409 exception, Account already exists for key 89f20977-f937-4bd7-82f9-ac4ef07b9999, indicating the account was successful created.
When creating similar accounts in the swagger page, I see the response code is 201, but the server does not return a body. The swagger page suggests that an Account object will be returned. This conflicts with the information in the docs, which says that the endpoint will return a URL in the location header.
If so, could you share a Main class that reproduces the issue on a vanilla installation? The Java client is used pervasively throughout our test suite, and I don't know of any regression.
Is the Location header returning HTTP instead of HTTPS? What is terminating SSL, Tomcat or an intermediate load balancer? If the latter, you might need to configure the load balancer to send x-forwarded-proto.
Activity
pierre commentedon Nov 16, 2024
Indeed, Kill Bill doesn't return the body upon creation (https://docs.killbill.io/latest/quick_start_with_kb_api#_step_3_create_an_account), but you can ask the client to fetch it automatically using
requestOptions.withFollowLocation(true):killbill-client-java/src/main/java/org/killbill/billing/client/KillBillHttpClient.java
Line 336 in 910bcdc
IIRC we could never really tell Swagger about this behaviour.
steven-barnes commentedon Nov 18, 2024
I have tried that, and still get an IOException:
Looking at the code for
createAccount, it seems to be settingfollowLocationto TRUE by default.pierre commentedon Nov 18, 2024
Are you following https://docs.killbill.io/latest/java_client ?
If so, could you share a
Mainclass that reproduces the issue on a vanilla installation? The Java client is used pervasively throughout our test suite, and I don't know of any regression.steven-barnes commentedon Nov 18, 2024
I am using the latest version in Maven Central, 1.3.6. I have coded a test in Java, and still get an IOException:
pierre commentedon Nov 19, 2024
Unable to reproduce.
pom.xml:
App.java:
Execution:
Java version:
steven-barnes commentedon Nov 19, 2024
Using the debugger, I can see that the location URL is using http, the request to killbill is using https:
http://killbill.dev.commerce.comcast.com:80/1.0/kb/accounts/16c15fcb-f461-4ae0-baff-ec114883496aWe are self-hosting KB in AWS, and I am testing from my laptop.
pierre commentedon Nov 20, 2024
Is the
Locationheader returning HTTP instead of HTTPS? What is terminating SSL, Tomcat or an intermediate load balancer? If the latter, you might need to configure the load balancer to sendx-forwarded-proto.Related: