Fix Broken Exception Handling in Snapshot Cleanup Tool (#63243)

In the latest version of the GCS SDK the `404` exception is wrapped
in an `IOException` making it not pass to the unwrapping added in
the previous fix #63168.
We can't be handling `IOException` differently here now that GCS uses it
for `404`s so I adjusted the exception unwrapping accordingly.

Closes #63091
This commit is contained in:
Armin Braun 2020-10-05 16:50:47 +02:00 committed by GitHub
parent 461475f9e9
commit 509fa46c9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -94,9 +94,6 @@ public abstract class AbstractRepository {
LoggingDeprecationHandler.INSTANCE, out.bytes(), XContentType.JSON)) { LoggingDeprecationHandler.INSTANCE, out.bytes(), XContentType.JSON)) {
return incompatibleSnapshotsFromXContent(parser); return incompatibleSnapshotsFromXContent(parser);
} }
} catch (IOException e) {
terminal.println("Failed to read [incompatible-snapshots] blob");
throw e;
} catch (Exception e) { } catch (Exception e) {
if (isBlobNotFoundException(e)) { if (isBlobNotFoundException(e)) {
return Collections.emptyList(); return Collections.emptyList();