Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unifile throws error instead of rejecting Promise #148

Open
lexoyo opened this issue Jan 10, 2019 · 2 comments
Open

Unifile throws error instead of rejecting Promise #148

lexoyo opened this issue Jan 10, 2019 · 2 comments

Comments

@lexoyo
Copy link
Member

lexoyo commented Jan 10, 2019

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 error Error: Unknown connector: fs instead of returning Promise.reject with this same error

Am I mistaken? Is this the intended behaviour?

Thx!

@JbIPS
Copy link
Collaborator

JbIPS commented Jan 10, 2019

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.

@lexoyo
Copy link
Member Author

lexoyo commented Aug 6, 2019

Same for writeFile, cf CloudExplorer2 router.js file, there is a comment about that

JbIPS added a commit that referenced this issue Sep 2, 2019
Even before the call to the service, errors are send via rejected Promises.

Fix #148
@JbIPS JbIPS mentioned this issue Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants