in src/main/java/org/apache/cassandra/sidecar/utils/SSTableUploader.java [135:151]
private static boolean hasCause(Throwable cause, Class<? extends Throwable> type, int depth)
{
int i = 0;
while (i < depth)
{
if (cause == null)
return false;
if (type.isInstance(cause))
return true;
cause = cause.getCause();
i++;
}
return false;
}