Skip to content

Commit 454958d

Browse files
committed
remove most of the changes for #560 since ML8 Server doesn't yet return 428 status code
1 parent 11abaee commit 454958d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/marklogic/client/impl/JerseyServices.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ public TemporalDescriptor deleteDocument(RequestLogger reqlog, DocumentDescripto
548548
throw new ResourceNotFoundException(
549549
"Could not delete non-existent document");
550550
}
551-
if (statusCode == 428) {
551+
if (status == ClientResponse.Status.FORBIDDEN) {
552552
FailedRequest failure = extractErrorFields(response);
553553
if (failure.getMessageCode().equals("RESTAPI-CONTENTNOVERSION")) {
554554
throw new FailedRequestException(
@@ -1334,7 +1334,7 @@ private TemporalDescriptor putPostDocumentImpl(RequestLogger reqlog, String meth
13341334
"Could not write non-existent document",
13351335
extractErrorFields(response));
13361336
}
1337-
if (statusCode == 428) {
1337+
if (status == ClientResponse.Status.FORBIDDEN) {
13381338
FailedRequest failure = extractErrorFields(response);
13391339
if (failure.getMessageCode().equals("RESTAPI-CONTENTNOVERSION")) {
13401340
throw new FailedRequestException(
@@ -1487,7 +1487,7 @@ private TemporalDescriptor putPostDocumentImpl(RequestLogger reqlog, String meth
14871487
throw new ResourceNotFoundException(
14881488
"Could not write non-existent document");
14891489
}
1490-
if (statusCode == 428) {
1490+
if (status == ClientResponse.Status.FORBIDDEN) {
14911491
FailedRequest failure = extractErrorFields(response);
14921492
if (failure.getMessageCode().equals("RESTAPI-CONTENTNOVERSION")) {
14931493
throw new FailedRequestException(

0 commit comments

Comments
 (0)