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/conflict/folder/...",
"error": {
".tag": "path",
"reason": {
".tag": "conflict",
"conflict": {".tag": "folder"}
},
"upload_session_id": "AAAAAAAAVfvllHwbx7wZGA"
}
}