Skip to content

Commit 8ea9951

Browse files
committed
Replace 404 with HttpURLConnection.HTTP_NOT_FOUND
1 parent 2488456 commit 8ea9951

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/elasticsearch/cloud/azure/blobstore/AbstractAzureBlobContainer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.io.FileNotFoundException;
3434
import java.io.IOException;
3535
import java.io.InputStream;
36+
import java.net.HttpURLConnection;
3637
import java.net.URISyntaxException;
3738

3839
/**
@@ -97,7 +98,7 @@ public void run() {
9798
is.close();
9899
listener.onCompleted();
99100
} catch (ServiceException e) {
100-
if (e.getHttpStatusCode() == 404) {
101+
if (e.getHttpStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) {
101102
listener.onFailure(new FileNotFoundException(e.getMessage()));
102103
} else {
103104
listener.onFailure(e);

0 commit comments

Comments
 (0)