When trying to upload a file with special character to dropbox, dropbox server will response http code 400 and the error message is non-json format with error response "Error in call to API function "files/upload": Invalid path: INVALID_PATH". This kind of error message is not well defined in API documents.
Does it is expected behavior and will it possible to align the error behavior to another json-style error response.
Or is there a official document to defined non-json format style error.
Example:
curl -v -X POST https://content.dropboxapi.com/2/files/upload --header "Authorization: Bearer access_token" --header "Dropbox-API-Arg: {\"path\": \"/folder1/�}�W\",\"mode\": \"add\",\"autorename\": false,\"mute\": false}" --header "Content-Type: application/octet-stream" --data-binary @test.pdf
> POST /2/files/upload HTTP/1.1
> Host: content.dropboxapi.com
> User-Agent: curl/7.54.0
> Accept: */*
> Authorization: Bearer access_token
> Dropbox-API-Arg: {"path": "/folder1/�}�W","mode": "add","autorename": false,"mute": false}
> Content-Type: application/octet-stream
> Content-Length: 0
>
< HTTP/1.1 400 Bad Request
< Server: envoy
< Date: Fri, 30 Oct 2020 08:29:00 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Security-Policy: sandbox allow-forms allow-scripts
< X-Dropbox-Request-Id: 5a99ff1dacac40da8df0f9439dc8c4f4
< X-Robots-Tag: noindex, nofollow, noimageindex
< Strict-Transport-Security: max-age=31536000; includeSubDomains
< X-Robots-Tag: noindex, nofollow, noimageindex
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
Error in call to API function "files/upload": Invalid path: INVALID_PATH