Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

DocLibClient error on call of createFolder with Library parameter HTTP Error 500 -- Microsoft.SharePoint.SPQueryThrottledException #18

Open
adelinor opened this issue May 13, 2017 · 0 comments

Comments

@adelinor
Copy link

After resolving issue #17 the next problem is creating a folder by specifying a Library:

ListenableFuture<FileSystemItem> handle = client.createFolder("this/is/a/revolution", "Filestore");

... the folder gets created in SharePoint, but the call fails with:

java.util.concurrent.ExecutionException: java.lang.Exception: Invalid status code 500: {"error":{"code":"-2147024860, Microsoft.SharePoint.SPQueryThrottledException","message":{"lang":"en-US","value":"The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator."}}}

	at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)
	at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)

The error stems from the search following specified when a library is provided:

if (library == null) {
	postUrl = getSiteUrl() + "_api/files";
} else {
	postUrl = getSiteUrl() + String.format("_api/web/lists/GetByTitle('%s')/files", urlEncode(library));
}

This search is too wide or not specific enough it seems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant