Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

vewert's avatar
vewert
Explorer | Level 4
9 years ago
Solved

SwiftyDropbox - how to catch improperly formatted path

If I make a call, (e.g. using listFolder), and I pass in an invalid path argument, (e.g. no leading slash), I get the following error:   precondition failed: "Does not exist must match pattern "\...
  • Greg-DB's avatar
    9 years ago
    The SDK has a copy of the API specification and can tell when the supplied value isn't valid without making a call to the server (and thus without going through the API error callback).

    You'll need to prevent your app from using invalid values like this in the first place. E.g., only use safe values returned by the API, such as in Metadata.pathLower, or just "" for root. If your app allows the user to manually enter in path values, you'll need to check them against the pattern in that error message first.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

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, Facebook or Instagram.

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!