cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Do you have an idea for Dropbox Paper? Share it with us here!

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

Re: Status codes: Dropbox sdk java

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

Reply
Loading...
3 Replies

Re: Status codes: Dropbox sdk java

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

Reply
Loading...

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.

Reply
Loading...

Re: Status codes: Dropbox sdk java

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!

Reply
Loading...
Developer & API Discussions

Have a question? Our Dropbox Community is here to help you find an answer!
You won’t have to wait too long for a reply, but why not learn more about the Community while you’re here.

Not the right discussion for you? Find out what else our Community has to say about Developer & API Discussions.

Or, search our Help Center for even more.

Who's talking
Top contributors to this post