We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

wen_hsiao's avatar
wen_hsiao
Explorer | Level 4
5 years ago

Create a folder with special characters will get empty response

I tried the following operation and got empty response.

I can't distinguish between "Invalid name" or "Server temporary error"

Is it possible to return detailed message which can indicate invlid file name ?

 

curl -v -X POST https://api.dropboxapi.com/2/files/create_folder_v2 --header "Authorization: Bearer accesstoken" --header "Content-Type: application/json" --data "{\"path\": \"/�}�֌W\",\"autorename\": false}"
Note: Unnecessary use of -X or --request, POST is already inferred.
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
> POST /2/files/create_folder_v2 HTTP/2
> Host: api.dropboxapi.com
> User-Agent: curl/7.61.1
> Accept: */*
> Authorization: Bearer accesstoken
> Content-Type: application/json
> Content-Length: 43
>
< HTTP/2 500
< content-security-policy: sandbox allow-forms allow-scripts
< content-type: text/plain; charset=utf-8
< date: Fri, 30 Oct 2020 10:52:43 GMT
< server: envoy
< x-dropbox-request-id: af9ee9f90e494139a89ba5c9eef11ce1
< content-length: 0
<

  • Greg-DB's avatar
    Greg-DB
    5 years ago

    Thanks for following up. I wasn't sure if that was the actual payload the app was sending, or if it got mangled when posting to the forum. I'll work on reproducing this with that and ask the team to fix the error handling.

     

    I can't promise if/when they might be able to work on that though, so I recommend also updating your app's code to be able to handle server errors like this.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    A 500 error like this indicates something failed on the Dropbox API servers when processing the request. Unfortunately there isn't a way to retrieve more information about the failure via the API, but we can look into it for you.

     

    To help us do so, can you share more information about how to reproduce this? It appears to be due to the path value you'e supplying, but that value appears malformed in your post here. Can you share exactly what data you're sending that results in this error?

    • wen_hsiao's avatar
      wen_hsiao
      Explorer | Level 4

      The folder with malformated name is exists in one of our customer's NAS device, then our applicatoin on NAS tried to create that folder on his Dropbox but got 500 Internal Server Error.


      Unfortunately, I can't tell why he created that name, but you can reproduce the error with the command as I posted previously.

       

      I think 500 Internal Server Error can be retried and recovered normal later, but in this case it's not so our application kept loop retrying

       

      If it can return any error other than 500, that will help. Thank you.

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        Thanks for following up. I wasn't sure if that was the actual payload the app was sending, or if it got mangled when posting to the forum. I'll work on reproducing this with that and ask the team to fix the error handling.

         

        I can't promise if/when they might be able to work on that though, so I recommend also updating your app's code to be able to handle server errors like this.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 12 months ago
325 Following

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 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!