mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 20:47:45 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.6
This commit is contained in:
@@ -5,7 +5,23 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.GetResizedPhotoResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetDevicesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetDevicesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout;
|
||||
import dev.plexapi.sdk.models.errors.GetServerListBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerListUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.GetAvailableClientsRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse;
|
||||
@@ -170,19 +186,11 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
dev.plexapi.sdk.models.errors.GetServerCapabilitiesResponseBody _out = Utils.mapper().readValue(
|
||||
GetServerCapabilitiesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetServerCapabilitiesResponseBody>() {});
|
||||
new TypeReference<GetServerCapabilitiesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -194,6 +202,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetServerCapabilitiesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetServerCapabilitiesUnauthorized>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
} else {
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"Unexpected content-type received: " + _contentType,
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
@@ -301,19 +333,11 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
dev.plexapi.sdk.models.errors.GetServerPreferencesResponseBody _out = Utils.mapper().readValue(
|
||||
GetServerPreferencesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetServerPreferencesResponseBody>() {});
|
||||
new TypeReference<GetServerPreferencesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -325,6 +349,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetServerPreferencesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetServerPreferencesUnauthorized>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
} else {
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"Unexpected content-type received: " + _contentType,
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
@@ -432,19 +480,11 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
dev.plexapi.sdk.models.errors.GetAvailableClientsResponseBody _out = Utils.mapper().readValue(
|
||||
GetAvailableClientsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetAvailableClientsResponseBody>() {});
|
||||
new TypeReference<GetAvailableClientsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -456,6 +496,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetAvailableClientsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetAvailableClientsUnauthorized>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
} else {
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"Unexpected content-type received: " + _contentType,
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
@@ -563,19 +627,11 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
dev.plexapi.sdk.models.errors.GetDevicesResponseBody _out = Utils.mapper().readValue(
|
||||
GetDevicesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetDevicesResponseBody>() {});
|
||||
new TypeReference<GetDevicesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -587,6 +643,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetDevicesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetDevicesUnauthorized>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
} else {
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"Unexpected content-type received: " + _contentType,
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
@@ -693,9 +773,9 @@ public class Server implements
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "408")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
dev.plexapi.sdk.models.errors.GetServerIdentityResponseBody _out = Utils.mapper().readValue(
|
||||
GetServerIdentityRequestTimeout _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetServerIdentityResponseBody>() {});
|
||||
new TypeReference<GetServerIdentityRequestTimeout>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -822,19 +902,11 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
dev.plexapi.sdk.models.errors.GetMyPlexAccountResponseBody _out = Utils.mapper().readValue(
|
||||
GetMyPlexAccountBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetMyPlexAccountResponseBody>() {});
|
||||
new TypeReference<GetMyPlexAccountBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -846,6 +918,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetMyPlexAccountUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetMyPlexAccountUnauthorized>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
} else {
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"Unexpected content-type received: " + _contentType,
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
@@ -951,19 +1047,11 @@ public class Server implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetResizedPhotoResponseBody _out = Utils.mapper().readValue(
|
||||
GetResizedPhotoBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetResizedPhotoResponseBody>() {});
|
||||
new TypeReference<GetResizedPhotoBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -975,6 +1063,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetResizedPhotoUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetResizedPhotoUnauthorized>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
} else {
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"Unexpected content-type received: " + _contentType,
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
@@ -1095,19 +1207,11 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
dev.plexapi.sdk.models.errors.GetMediaProvidersResponseBody _out = Utils.mapper().readValue(
|
||||
GetMediaProvidersBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetMediaProvidersResponseBody>() {});
|
||||
new TypeReference<GetMediaProvidersBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1119,6 +1223,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetMediaProvidersUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetMediaProvidersUnauthorized>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
} else {
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"Unexpected content-type received: " + _contentType,
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
@@ -1226,19 +1354,11 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
dev.plexapi.sdk.models.errors.GetServerListResponseBody _out = Utils.mapper().readValue(
|
||||
GetServerListBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetServerListResponseBody>() {});
|
||||
new TypeReference<GetServerListBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1250,6 +1370,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetServerListUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetServerListUnauthorized>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
} else {
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"Unexpected content-type received: " + _contentType,
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
|
||||
Reference in New Issue
Block a user