API inconsistency: "filesDownload" returns an error as a string instead of an object
See original GitHub issueVersion: “dropbox”: “^5.1.0”
If I provide a wrong path structure to filesDownload
, Dropbox throws path/malformed_path/..
error.
The problem is that this error object provides data in a serialized (string) format and not as an object:
This makes it more difficult to handle an error.
In contrast, filesUpload
returns the same error as an object:
It looks like somewhere in filesDownload
there is an issue with JSON.stringify(…)
/JSON.parse(…)
.
Please, make it consistent as an object.
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Angular4 - Http error returned is a string instead of an object
I'm doing an Http request in Angular 4 using its builtin HttpClient class. Everything works well, but there is a small problem with...
Read more >Inconsistent API response for passing strings exceeding 255 ...
I'm working on error handling and want to be sure I'm covering some bases to provide more suitable user-facing error messaging.
Read more >D.R.S Dz - Autopistas de la Sabana
Fixed drupal_render() to always return an empty string when there is no output, rather than sometimes returning NULL (minor API change).
Read more >Errors | Node.js v19.3.0 Documentation
Creates a .stack property on targetObject , which when accessed returns a string representing the location in the code at which Error.
Read more >Modifying the PowerBuilder client app - - PowerServer 2022 Help
Uses the identity token to access data from the PowerServer Web API. ... Case 240 to 249 //Token Error MessageBox ("Token Error", "Number:"...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the report! I’ll ask the team to fix this up.
Hello, I am able to reproduce this issue but am unable to reproduce the desired outcome you said you were unable to achieve with
filesUpload
.The sample code I used looks like this:
And the output looks like this:
As you can see both return a string type. While I can make the change to have these return a JSON object, I am trying to see how you were able to get upload to return an object. Could you paste some code snippets?