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:
parent
461475f9e9
commit
509fa46c9e
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue