Forum Discussion

Christian T.16's avatar
Christian T.16
New member | Level 1
10 years ago

parsing upload session finish error

Can you provide an example of how to parse an upload session finish error. Here's what I have but none of these cases are triggered. I do get Error but no further details. Thanks.

                        // we're ready to finish the upload and commit the file

                        client.files.uploadSessionFinish(cursor: Files.UploadSessionCursor(sessionId: result.sessionId, offset: position),

                            commit: Files.CommitInfo(path: “somePath”),

                            body:data).response { response, error in

                                

                                if let result = response {

                                    print("UPLOAD SESSION FINISH RESULT: \(result)")

                                } else {

                                    print("UPLOAD SESSION FINISH ERROR: \(error!)!")

                                    switch error {

                                        case .LookupFailed:

                                            print("LOOKUP FAILED")

                                        case .Path:

                                            print("PATH ERROR")

                                        case .Other:

                                            print("OTHER ERROR")

                                    }

                                }

 

                        }

 

17 Replies

Replies have been turned off for this discussion

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!