Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here!
Forum Discussion
TK K.
10 years agoNew member | Level 1
Recommended Error Strategies?
After successfully integrating DropBox into an iOS app in the expected cases, I decided to do some nasty things and learn more about error handling.
Namely I went and deleted the DropBox App/MyAppName folder on the dropbox, then let the app go for it. I started getting 401 errors "User has removed their App folder." - so I went about handling this error by requiring the user to reauthenticate completely
Now I am wondering what other errors unrelated to things done in my app do I need to be aware of and how should I handle them? Of course connectivity errors are easy, but is there a specific reference showing all the DB errors and anything about what generates them and how an app should respond?
Thanks in advance.
8 Replies
Replies have been turned off for this discussion
- Greg-DB10 years ago
Dropbox Community Moderator
What API/SDK are you using in particular?
- TK K.10 years agoNew member | Level 1
ios
- Greg-DB10 years ago
Dropbox Community Moderator
Sorry, I should have been clearer, I was referring to the Dropbox SDK you're using (if any). For example, are you using the Dropbox iOS Core SDK for API v1, or the newer SwiftyDropbox SDK for API v2?
- TK K.10 years agoNew member | Level 1
v1
- Greg-DB10 years ago
Dropbox Community Moderator
So are you using the SDK or calling the API directly?
- TK K.10 years agoNew member | Level 1
I am using the SDK for which there is no documentation - so I am looking for a reference that teaches the error codes that are passed on and how a well behaved DB app should handle them. I already figured out any 401 errors require total reauthentication.
- Greg-DB10 years ago
Dropbox Community Moderator
Thanks! Yes, unfortunately we don't have good documentation around this for the iOS Core SDK. (If you're just starting out and can use Swift though, you may want to use the Dropbox SwiftyDropbox SDK instead, which has better documentation and more explicit error handling.)
Anyway, it sounds like you've already handled sessionDidReceiveAuthorizationFailure on DBSession. That covers authorization failures.
For other errors, you should make sure to implement the error callbacks for whatever methods you're using. You can find the full list in DBRestClient.h, along with some more comments about them.
- TK K.10 years agoNew member | Level 1
There really is no documentation in the Swifty docs that discusses what you should do when various errors do occur - the closest I could find is here - https://www.dropbox.com/developers-v1/core/docs under the Standard API Errors section. THanks!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,037 PostsLatest Activity: 10 hours ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!