Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Kevin H.27
10 years agoNew member | Level 1
BadResponseException: Bad JSON
Dear Dropbox Community,
I am using the Dropbox API v2 for my Android app. Lately I have been seeing issues when trying to download a file with client.files().download() where the file does not (yet...
Kevin H.27
10 years agoNew member | Level 1
Gergory, thanks for your reply!
I have a podcast app which has multiple variants, all using the "App folder" permission. I see this problem consistently now for all the variants and I think that the same code worked last week. My steps are quite simple:
0. Unlink app and delete app folder to reset
1. Connect app using the AuthActivity
2. Try to download "/Subscriptions.txt" with client.files().download()
From the debugging I can see that the correct request is send and that the server returns a status code of 409 (probably okay since the file does not yet exist). The Dropbox SDK then tries to parse the response body as a JSON, and fails since it is empty. This results in a BadResponseException instead of the DownloadErrorException I am expecting. If I try the same query from the API Explorer, I get the correct answer:
{
"error_summary": "path/not_found/..",
"error": {
".tag": "path",
"path": {
".tag": "not_found"
}
}
}
About 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!