cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: API v2 how to test reset (with list_folder)

API v2 how to test reset (with list_folder)

Craig S.28
New member | Level 2
Go to solution

Just porting my app to use v2 API. Previously I would use the /delta feature to keep a local cache of file/folder names etc. Now I'm using the /list_folder endpoint and all is working ok.

 

One thing I want to test is when the server returns a 'reset' error to indicate that I must regenerate my cache. Anyone know how to trigger one of those?

 

Thanks

 

Craig

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
The reset error should be relatively rare, for example, in the case where maintenance requires us to reset that cursor state.

We don't have a way to simulate this response unfortunately, but I'll be sure to pass this along as a feature request.

One edge case where you can force this though is with app folder app by deleting the app folder and relinking. That is:
1) Link an app folder app.
2) Get a cursor.
3) Delete the app folder (e.g., via dropbox.com).
4) Get a new access token (which creates a new app folder).
5) Call list_folder/continue using the cursor from 2.

That's a bit of work though, so for the sake of testing your app, it's probably easier to just mock it/force your app through that code path.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution
The reset error should be relatively rare, for example, in the case where maintenance requires us to reset that cursor state.

We don't have a way to simulate this response unfortunately, but I'll be sure to pass this along as a feature request.

One edge case where you can force this though is with app folder app by deleting the app folder and relinking. That is:
1) Link an app folder app.
2) Get a cursor.
3) Delete the app folder (e.g., via dropbox.com).
4) Get a new access token (which creates a new app folder).
5) Call list_folder/continue using the cursor from 2.

That's a bit of work though, so for the sake of testing your app, it's probably easier to just mock it/force your app through that code path.
Need more support?