cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

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: 
Highlighted

SwiftyDropbox Error Handling

New member | Level 1
New member | Level 1

Hello!

I’ve been working with SwiftyDropbox and I’m having a curious problem with errors. Specifically, I’m not sure how to manipulate errors in the closure callbacks provided after responses are received.

For instance, the completion handler for Dropbox.authorizedClient.filesListFolder provides a CallError<(Files.ListFolderError)>? to work with. How would I go about checking if it is a CallError.HTTPError, so that I can get the HTTP error code out of it? Right now I’m just sucking that information out of the error’s .description but that doesn’t seem like the right way to do it.

Halp? :(

I suspect that I do not properly understand how to deal with the generics involved:

 

2 Replies 2
Highlighted

Re: SwiftyDropbox Error Handling

Dropboxer
Dropboxer
Highlighted

Re: SwiftyDropbox Error Handling

New member | Level 1
New member | Level 1

Ah, I should have cross-linked when I posted both. Thank you!

That SO answer was quite a gem.

Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?