Suddenly started getting "Access denied - item locked"
Answered
I have an app that access box 100% read only. starting yesterday/today a lot of my clients started getting this error, I can't figure out what it might really mean. I am not modyfing anything so a lock would be a problem. in fact I test-locked a file and all calls I do went fine. any ideas?
Error Domain=com.box.contentsdk.errordomain Code=403 "(null)" UserInfo={com.box.contentsdk.jsonerrorresponse={
code = "access_denied_item_locked";
"help_url" = "http://developers.box.com/docs/#errors";
message = "Access denied - item locked";
"request_id" = wixq3fpinthkbmu;
status = 403;
type = error;
}}
-
A lock is designed to prevent other users from making changes to a file while you're working on it — similar to "checking out" the file. As you can see in the lock/unlock API documentation, there is an option to prevent downloading the file while it's locked — this is likely what you're running into. Note that a locked file can still be accessed by the user that locked it — in your testing scenario, if you locked the file and then tried to download it from the same user account, it would work fine. Also, if you didn't enable the is_download_prevented option, downloads would still work regardless of which user was making the download API call — locks only prevent file edits by default.
In general, if your application is read-only, you may need to handle the lock case, potentially by retrying later.
Please sign in to leave a comment.
Comments
2 comments