**Build scan:**
https://gradle-enterprise.elastic.co/s/gdcbu2dd56xs4/tests/:modules:repository-gcs:internalClusterTest/org.elasticsearch.repositories.gcs.GcsProxyIntegrationTests/testReadNonExistingPath

**Reproduction line:**
```
./gradlew ':modules:repository-gcs:internalClusterTest' --tests "org.elasticsearch.repositories.gcs.GcsProxyIntegrationTests.testReadNonExistingPath" -Dtests.seed=D8450E34DDA908D -Dtests.locale=cs -Dtests.timezone=Indian/Cocos -Druntime.java=17
```

**Applicable branches:**
8.7

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.repositories.gcs.GcsProxyIntegrationTests&tests.test=testReadNonExistingPath

**Failure excerpt:**
```
org.elasticsearch.repositories.RepositoryVerificationException: [jmiik] cannot delete test data at 

  at __randomizedtesting.SeedInfo.seed([D8450E34DDA908D:30BBCDB5309B0D19]:0)

  Caused by: java.io.IOException: Exception when deleting blobs []

    at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.deleteBlobsIgnoringIfNotExists(GoogleCloudStorageBlobStore.java:579)
    at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.lambda$deleteDirectory$9(GoogleCloudStorageBlobStore.java:496)
    at java.security.AccessController.doPrivileged(AccessController.java:569)
    at org.elasticsearch.repositories.gcs.SocketAccess.doPrivilegedIOException(SocketAccess.java:33)
    at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.deleteDirectory(GoogleCloudStorageBlobStore.java:489)
    at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobContainer.delete(GoogleCloudStorageBlobContainer.java:98)
    at org.elasticsearch.repositories.blobstore.BlobStoreRepository.endVerification(BlobStoreRepository.java:1758)
    at org.elasticsearch.repositories.RepositoriesService$4.lambda$doRun$1(RepositoriesService.java:490)
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:891)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.lang.Thread.run(Thread.java:833)

    Caused by: org.elasticsearch.common.io.stream.NotSerializableExceptionWrapper: storage_exception: Unexpected end of file from server

      at com.google.cloud.storage.StorageException.translate(StorageException.java:118)
      at com.google.cloud.storage.spi.v1.HttpStorageRpc.translate(HttpStorageRpc.java:287)
      at com.google.cloud.storage.spi.v1.HttpStorageRpc.access$500(HttpStorageRpc.java:95)
      at com.google.cloud.storage.spi.v1.HttpStorageRpc$DefaultRpcBatch.submit(HttpStorageRpc.java:263)
      at com.google.cloud.storage.StorageBatch.submit(StorageBatch.java:149)
      at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.lambda$deleteBlobsIgnoringIfNotExists$10(GoogleCloudStorageBlobStore.java:570)
      at org.elasticsearch.repositories.gcs.SocketAccess.lambda$doPrivilegedVoidIOException$0(SocketAccess.java:43)
      at java.security.AccessController.doPrivileged(AccessController.java:569)
      at org.elasticsearch.repositories.gcs.SocketAccess.doPrivilegedVoidIOException(SocketAccess.java:42)
      at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.deleteBlobsIgnoringIfNotExists(GoogleCloudStorageBlobStore.java:539)
      at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.lambda$deleteDirectory$9(GoogleCloudStorageBlobStore.java:496)
      at java.security.AccessController.doPrivileged(AccessController.java:569)
      at org.elasticsearch.repositories.gcs.SocketAccess.doPrivilegedIOException(SocketAccess.java:33)
      at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.deleteDirectory(GoogleCloudStorageBlobStore.java:489)
      at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobContainer.delete(GoogleCloudStorageBlobContainer.java:98)
      at org.elasticsearch.repositories.blobstore.BlobStoreRepository.endVerification(BlobStoreRepository.java:1758)
      at org.elasticsearch.repositories.RepositoriesService$4.lambda$doRun$1(RepositoriesService.java:490)
      at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:891)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      at java.lang.Thread.run(Thread.java:833)

      Caused by: java.io.IOException: Unexpected end of file from server

        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:936)
        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:759)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1688)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:529)
        at com.google.api.client.http.javanet.NetHttpResponse.<init>(NetHttpResponse.java:36)
        at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:152)
        at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:84)
        at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1012)
        at com.google.api.client.googleapis.batch.BatchRequest.execute(BatchRequest.java:257)
        at com.google.cloud.storage.spi.v1.HttpStorageRpc$DefaultRpcBatch.submit(HttpStorageRpc.java:259)
        at com.google.cloud.storage.StorageBatch.submit(StorageBatch.java:149)
        at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.lambda$deleteBlobsIgnoringIfNotExists$10(GoogleCloudStorageBlobStore.java:570)
        at org.elasticsearch.repositories.gcs.SocketAccess.lambda$doPrivilegedVoidIOException$0(SocketAccess.java:43)
        at java.security.AccessController.doPrivileged(AccessController.java:569)
        at org.elasticsearch.repositories.gcs.SocketAccess.doPrivilegedVoidIOException(SocketAccess.java:42)
        at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.deleteBlobsIgnoringIfNotExists(GoogleCloudStorageBlobStore.java:539)
        at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.lambda$deleteDirectory$9(GoogleCloudStorageBlobStore.java:496)
        at java.security.AccessController.doPrivileged(AccessController.java:569)
        at org.elasticsearch.repositories.gcs.SocketAccess.doPrivilegedIOException(SocketAccess.java:33)
        at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.deleteDirectory(GoogleCloudStorageBlobStore.java:489)
        at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobContainer.delete(GoogleCloudStorageBlobContainer.java:98)
        at org.elasticsearch.repositories.blobstore.BlobStoreRepository.endVerification(BlobStoreRepository.java:1758)
        at org.elasticsearch.repositories.RepositoriesService$4.lambda$doRun$1(RepositoriesService.java:490)
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:891)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.lang.Thread.run(Thread.java:833)

```
modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageClientSettingsTests.java
"https://www.googleapis.com/oauth/token"
            );
            settings.put(ENDPOINT_SETTING.getConcreteSettingForNamespace(clientName).getKey(), endpoint);
        } else {
            endpoint = ENDPOINT_SETTING.getDefault(Settings.EMPTY);
        }
        String projectId;
        if (randomBoolean()) {
            projectId = randomAlphaOfLength(5);
            settings.put(PROJECT_ID_SETTING.getConcreteSettingForNamespace(clientName).getKey(), projectId);
        } else {
            projectId = PROJECT_ID_SETTING.getDefault(Settings.EMPTY);
        }
        TimeValue connectTimeout;
        if (randomBoolean()) {
            connectTimeout = randomTimeout();
            settings.put(CONNECT_TIMEOUT_SETTING.getConcreteSettingForNamespace(clientName).getKey(), connectTimeout.getStringRep());
        } else {
            connectTimeout = CONNECT_TIMEOUT_SETTING.getDefault(Settings.EMPTY);
        }
        TimeValue readTimeout;
        if (randomBoolean()) {
            readTimeout = randomTimeout();
            settings.put(READ_TIMEOUT_SETTING.getConcreteSettingForNamespace(clientName).getKey(), readTimeout.getStringRep());
        } else {
            readTimeout = READ_TIMEOUT_SETTING.getDefault(Settings.EMPTY);
        }
        String applicationName;
        if (randomBoolean()) {
            applicationName = randomAlphaOfLength(5);