Take Your Search Game to the Next Level with Dropbox Dash  🚀✨ Curious how it works? Ask us here! 

Forum Discussion

Sam S.6's avatar
Sam S.6
Explorer | Level 4
4 years ago
Solved

Unhelpful error on "sharing/share_folder" API call with malfolrmed path.

When calling the `sharing/share_folder` endpoint with a path that contains disallowed characters, for example that ends with a backslash "\", the endpoint won't return a WriteError (malformed_path) but rather a HTTP error 500 (internal Dropbox error). This is not particularly helpful since it does not allow us to distinguish between actual backend errors and invalid input.

 

According to the documentation on Team Spaces and looking at the actual behaviour of the `sharing/share_folder` endpoint, a call with a non-existing path will create the specified folder. I would therefore expect that similar `WriteError`s as for `files/create_folder` should be returned in some cases.

 

If you'd like to look into the actual requests which I made to test this, the latest request id is 

52e7070699b94a88a1a1e7c47655d11a.

  • Thanks for the report. I'll ask the team to fix up that error handling so it returns a proper error in that kind of case.

1 Reply

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

    Thanks for the report. I'll ask the team to fix up that error handling so it returns a proper error in that kind of case.