When building with the Dropbox API, there are two common needs that you may encounter: dealing with errors and learning about changes in Dropbox. We just published new developer guides for both topics!
Introducing the Error Handling Guide and the Detecting Changes Guide.
Handling errors in Dropbox
Something you expect to find in well-written code is proper exception handling. The art of predicting, detecting, and gracefully recovering from errors is essential to building quality applications, especially when they integrate with other systems. In the Error Handling Guide, we cover error types, scenarios where you may encounter them, and share some best practices around error handling. In addition to the new guide, there are two other surfaces you can find information about errors in the Dropbox API:
- The error codes and descriptions in the Errors section at the top of the HTTP reference documentation
- The endpoint-specific “Errors” section under each endpoint in the docs (example from /sharing/get_shared_link_metdata):
Detecting changes to Dropbox data
Pretend you created a fictional app named DropPalette that analyzes photographs and returns a color palette with the five most common colors. The experience you want for your users is that photos dragged into the DropPalette folder are automatically analyzed and saved back with a color palette. You could provide that experience using webhooks.
Reacting to changes in Dropbox is a common need for a broad spectrum of apps. Because the Dropbox API provides multiple mechanisms to accomplish that, you’ll need to pick the approach best suited to the needs of your specific app. In the Detecting Changes Guide, we cover webhooks, polling, and efficient use of cursors to request the latest data. We provide some context around each tool and provide some guidance on choosing the right one for your app.
Keep an eye out for additional developer guides over the next couple of months!
Build with Dropbox today at