Java client throws IOException for 201 responses due to missing body
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
Riproduci il problema con la chiamata accountApi.createAccount del client Java e confrontala con la richiesta curl POST /1.0/kb/accounts. Leggi la definizione della risposta Swagger e la documentazione che descrive il location header, quindi traccia come viene gestita una risposta 201 senza body. Il lavoro è completo quando la creazione corretta di un account non produce più un IOException e il comportamento del client corrisponde al contratto di risposta documentato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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\"}"
- Lingua principale
- Java
- Stelle
- 35
- Fork
- 67
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di killbill/killbill-client-java
-
enhancement
killbill/killbill-client-java#144 · 1 commento · 1 assegnatario ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
killbill/killbill-client-java#140 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
killbill/killbill-client-java#135 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
killbill/killbill-client-java#131 · 1 commento ·
-
Issue with Get Queue entries Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
killbill/killbill-client-java#130 ·
Tutte le issue di killbill/killbill-client-java
Issue simili
-
bug untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
emitter:client:csharp feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Apertabug frontend maui-pilot
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100