Skip to content

Commit cc92585

Browse files
committed
.
1 parent 7ac794b commit cc92585

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/io/tiledb/cloud/rest_api/v2/auth/OAuthOkHttpClient.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ public <T extends OAuthClientResponse> T execute(OAuthClientRequest request, Map
5151

5252
try {
5353
Response response = client.newCall(requestBuilder.build()).execute();
54+
String bodyString = response.body() != null ? response.body().string() : "";
55+
String contentTypeString = response.body() != null && response.body().contentType() != null
56+
? response.body().contentType().toString()
57+
: "";
5458
return OAuthClientResponseFactory.createCustomResponse(
55-
response.body().string(),
56-
response.body().contentType().toString(),
59+
bodyString,
60+
contentTypeString,
5761
response.code(),
58-
response.headers().toMultimap(),
5962
responseClass);
6063
} catch (IOException e) {
6164
throw new OAuthSystemException(e);

0 commit comments

Comments
 (0)