public static DocumentClientException getThrottelingException()

in bulkimport/src/main/java/com/microsoft/azure/documentdb/bulkimport/ExceptionUtils.java [46:63]


    public static DocumentClientException getThrottelingException(Exception e) {
        DocumentClientException dce = null;
        while(e != null) {
            if (e instanceof DocumentClientException) {
                dce = (DocumentClientException) e;
                if (isThrottled(dce)) {
                    return dce;
                }
            }
            
            if (e.getCause() instanceof Exception) {
                e = (Exception) e.getCause();
            } else {
                break;
            }
        }
        return null;
    }