Forum Discussion

Laubwerk's avatar
Laubwerk
Explorer | Level 3
8 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

2 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago
    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.

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!