Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Java client throws IOException for 201 responses due to missing body

Open
#136 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
api

Research direction

Reproduce the issue with the Java client's accountApi.createAccount call and compare it with the POST /1.0/kb/accounts curl request. Read the Swagger response definition and the documentation describing the location header, then trace how a 201 response with no body is handled. Done means successful account creation no longer produces an IOException and the client behavior matches the documented response contract.

Written by the indexing model from the issue text.

Description

        Account body = new Account();
        body.setName("test3");
        body.setCurrency(Currency.USD);
        body.setExternalKey("89f20977-f937-4bd7-82f9-ac4ef07b9999");
        body.setEmail("test3@comcast.com");
        accountApi.createAccount(body, requestOptions);

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.

curl -X POST "https://killbill.dev.commerce.comcast.com/1.0/kb/accounts" -H "accept: application/json" -H "X-Killbill-CreatedBy: testing" -H "authorization: Basic REDACTED" -H "X-Killbill-ApiKey: REDACTED" -H "X-Killbill-ApiSecret: REDACTED" -H "Content-Type: application/json" -d "{ \"name\": \"test99\", \"externalKey\": \"89f20977-f937-4bd7-82f9-ac4ef0999999\", \"email\": \"test99@comcast.com\", \"currency\": \"USD\"}"
Dominant language
Java
Stars
35
Forks
67
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from killbill/killbill-client-java

All issues in killbill/killbill-client-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.