We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
Michal5
5 years agoExplorer | Level 4
Status codes: Dropbox sdk java
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.
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).
- Greg-DBDropbox Staff
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).
- Michal5Explorer | 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.
- Greg-DBDropbox Staff
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!
About Discuss Dropbox Developer & API
Make connections with other developers
795 PostsLatest Activity: 5 days agoIf 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 or Facebook.
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!