cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We want to hear from you. What do you use Dropbox for?
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Intermittent 400 errors with message "could not decode input as JSON"

Explorer | Level 3

Hi there,

I'm using Dropbox Java SDK v3.0.11 and recently have been encountering intermittent errors in some files v2 APIs. They are 400 errors with the following message:

com.dropbox.core.BadRequestException: Error in call to API function "files/delete": request body: could not decode input as JSON

I've seen it happen in the following places in com.dropbox.core.v2.files:

  • DbxUserFilesRequests.delete (files/delete)
  • DbxUserFilesRequests.getMetadata (files/get_metadata)
  • DbxUserFilesRequests.listFolder (files/list_folder)
  • DbxUserFilesRequests.createFolder (files/create_folder)

This started happening on Jan 8. I debugged and examined the request body thinking that the body is malformed as the error message suggests but it's fine:

 

{"path":"<path>","include_media_info":false,"include_deleted":false,"include_has_explicit_shared_members":false}

I stripped the path but there's no bad characters in there. An example request ID that failed is d8ecc6d0675671b91b7385ffd32c5620. Any ideas what might be causing this error?

 

Thanks!

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Intermittent 400 errors with message "could not decode input as JSON"

Dropboxer
Dropboxer

Thanks for the report! It looks like this may already be fixed in the latest version of the Java SDK, currently v3.1.3. Can you update to that and let me know if you're still seeing the issue with that? Thanks in advance! 

View solution in original post

3 Replies 3
Highlighted

Re: Intermittent 400 errors with message "could not decode input as JSON"

Dropboxer
Dropboxer

Thanks for the report! It looks like this may already be fixed in the latest version of the Java SDK, currently v3.1.3. Can you update to that and let me know if you're still seeing the issue with that? Thanks in advance! 

View solution in original post

Highlighted

Re: Intermittent 400 errors with message "could not decode input as JSON"

Explorer | Level 3

Thanks for the heads up. I'll upgrade the library and report back what I find

Highlighted

Re: Intermittent 400 errors with message "could not decode input as JSON"

Explorer | Level 3
I’m not getting any more errors after upgrading the library. Thanks so much!

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?