Forum Discussion

Laubwerk's avatar
Laubwerk
Explorer | Level 3
7 years ago

Trigger or simulate errors in Python SDK

Hi,

 

Apologies if this is a duplicate question, but I haven't been able to find anything that covers this.

 

I'm developing a Python API with the Dropbox SDK to work with our files on Dropbox.

 

I'd like our API to be able to handle Dropbox errors gracefully, using errorhandlers and the Dropbox exception classes, but for some of them, e.g., RateLimitError or InternalServerError, I'm not sure how I might go about triggering or simulating them. Of course, I can create a new instance of the exception classes in a shell and have a look, but this won't tell me much about what will usually be inside these objects, or how I'll be able to access their contents.

 

Do you have any suggestions as to how I can create, try out, and work with meaningful examples of these exceptions?

 

Thanks,

J

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    There isn't a way to directly trigger or simulate these unfortunately, but I'll pass this along as a feature request.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,947 PostsLatest Activity: 10 hours ago
351 Following

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!