private static ThrowableInfo causedByRetryableException()

in services/library/src/main/java/com/google/cloud/pso/bq_snapshot_manager/helpers/ControllerExceptionHelper.java [140:159]


    private static ThrowableInfo causedByRetryableException(Throwable throwable) {

        // check if the given throwable is Retryable
        ThrowableInfo throwableInfo = isRetryableException(throwable);

        // if so, stop here (recursion base case)
        if (throwableInfo.isRetryable())
            return throwableInfo;
        else {
            // if it has a cause, check if that cause is retryable

            // if it has no cause. Stop here (recursion base case)
            if (throwable.getCause() == null) {
                return new ThrowableInfo(throwable, false, "");
            } else {
                // if it has a cause, check if it's retryable (recursion)
                return causedByRetryableException(throwable.getCause());
            }
        }
    }