Open lexoyo opened 5 years ago
You're right, it shouldn't. I think it's because it fails before the async call but it should be wrapped in a Promise for consistency.
Same for writeFile, cf CloudExplorer2 router.js file, there is a comment about that
Hi @JbIPS
I found cases where unifile throws error instead of a "rejected" Promise
For example when you call
unifile.readdir
with a service which does not exist, it throws the errorError: Unknown connector: fs
instead of returning Promise.reject with this same errorAm I mistaken? Is this the intended behaviour?
Thx!