Forum Discussion

RJKinsman's avatar
RJKinsman
Helpful | Level 6
7 years ago
Solved

How to capture the error message

I want to capture the error message so I can do different actions depending on the text.  I can't figure out how to code this.  Here's my code... if DropboxClientsManager.authorizedClient !=...
  • Greg-DB's avatar
    7 years ago

    There's an example of breaking down the error like this in the readme here:

    https://github.com/dropbox/SwiftyDropbox#route-specific-errors

    That example is for the delete call, but the mechanic is the same. For getMetadata, the route-specific error type is GetMetadataError.

    Be sure to check out the section right after that for an example of handling higher-level errors too.

    You can make the error handling as broad or as specific as you wish by breaking out each case (or not).

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!