Java client throws IOException for 201 responses due to missing body
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
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
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
-
enhancement
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 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 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
killbill/killbill-client-java#130 ·
All issues in killbill/killbill-client-java
Similar issues
-
bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
emitter:client:csharp feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100