Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
xguerin
5 years agoNew member | Level 2
Documentation: UploadError marked as “open union”, is “datatype with subtype”
In /upload, the documentation gives UploadError as an open union, but is actually a datatype with subtype.
Here is an example of what the server returns:
{
"error_summary": "path/co...
Greg-DB
Dropbox Community Moderator
5 years agoI see, thanks for clarifying. I believe the combined serialization is expected in this case, per the Stone documentation:
Union members that are ordinary structs (
coordin the example) serialize as the struct with the addition of a.tagkey.
In this case, the UploadError union member UploadWriteFailed is a struct.
R Brown
4 years agoExplorer | Level 3
There are relatively few such cases in the API, and UploadWriteFailed (a struct inside an error union) is one of them; the others seem to be recent additions (e.g., LockConflictError inside LockFileError).
I also tripped over this error, because the author of the dropboxQt package that I use (https://github.com/osoftteam/dropboxQt) made the same mistake in their translation from Stone to C++/Qt (expecting the struct to stand as a single object embedded in the union, not broken out as fields). Sigh.
About Discuss Dropbox Developer and API
Explore Dropbox Developer & API discussions with developers like you.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!