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

OneDrive for Business: "MoveFile" doesn't throw client exception if file already exists #70

Closed
ThomasSHA opened this issue Apr 5, 2016 · 3 comments
Assignees

Comments

@ThomasSHA
Copy link

I implemented a "move" -fileoperation
So I used ...buildRequest().patch(newLocation, new ICallback<Item(){....}

When using MSA i get a failure callback with an OneDriveErrorCodes.NameAlreadyExists-Error
This is great.

When using OneDrive for Business Account, it just successfully finishes, which is not really I would expect ;)

I hope you can help me again

Thanks in advance,
Thomas

@ThomasSHA
Copy link
Author

Another related question:
Would it be possible to get an NameAlreadyExists-Error also when posting a new item (in my case a folder) and copying (getCopy(...).buildRequest().post())?

Or is there a way to easily get information if a "name" already exists in a folder, rather then iterating over the folder's children?
edit: ok I maybe found a "nicer" way: mOneDriveClient.getDrive().getItems(folder).getChildren(itemName).buildRequest().get();
but although I catch the ClientException I get the whole error in logcat. Is it possible to remove this log output (It seems to come from DefaultHttpProvider line 202 ( this.mLogger.logError("OneDrive Service exception " ). Maybe you could introduce some kind of new logging lvl which does not log such things :)

@ThomasSHA
Copy link
Author

mOneDriveClient.getDrive().getItems(folder).getChildren(itemName).buildRequest().get();
doesn't seem to work with OneDrive for Business => com.onedrive.sdk.http.OneDriveServiceException: Error code: Unable to parse error response message

@baywet
Copy link
Member

baywet commented Oct 2, 2024

Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #172 for more information

@baywet baywet closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
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

3 participants