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("[email protected]");
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\": \"[email protected]\", \"currency\": \"USD\"}"
- 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 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
-
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