cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We want to make our Community work for you and we need your help. Take our short survey!
Close

Discuss Dropbox Developer & API

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

Status codes: Dropbox sdk java

Highlighted

Status codes: Dropbox sdk java

Explorer | Level 4

Hi Dropbox team,

Is there a possibility to acces status code in dropbox sdk java ? for example Check User

"If you receive an HTTP 200 response with the supplied query" how can I access status code ?

Thank you for your answer.

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Status codes: Dropbox sdk java

Dropboxer
Dropboxer

The official Dropbox SDKs don't return the actual status codes directly. They instead translate them to different exception types that you can catch natively.

For example, in the Java SDK, the DbxUserCheckRequests.user method will return an EchoResult if the call is successful (i.e., a 200 status code), or raise an exception, such as DbxApiException or DbxException, if the call failed (e.g., a 4xx or 5xx status code).

View solution in original post

3 Replies 3
Highlighted

Re: Status codes: Dropbox sdk java

Dropboxer
Dropboxer

The official Dropbox SDKs don't return the actual status codes directly. They instead translate them to different exception types that you can catch natively.

For example, in the Java SDK, the DbxUserCheckRequests.user method will return an EchoResult if the call is successful (i.e., a 200 status code), or raise an exception, such as DbxApiException or DbxException, if the call failed (e.g., a 4xx or 5xx status code).

View solution in original post

Highlighted

Re: Status codes: Dropbox sdk java

Explorer | Level 4

So there is no way to access status codes directly ? I know about exception. I am catching exceptions but it is not enough. Anyway thank you for your answer.

Highlighted

Re: Status codes: Dropbox sdk java

Dropboxer
Dropboxer

That's correct, the Java SDK doesn't directly expose the status code itself. In the case of that method, if it returns a EchoResult that means that the API returned a 200 status, and the different exceptions correspond to the different kinds of failures. Can you elaborate on what you need that that doesn't cover? Thanks!

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?