-
-
Notifications
You must be signed in to change notification settings - Fork 37.5k
openAsBlob fails synchronously #62418
Copy link
Copy link
Open
Labels
fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.
Description
Activity
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.
Version
v24.14.0
Platform
Subsystem
fsWhat steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
I expect
openAsBlob()to always return a promise. If there are any problems, I expect the promise to be rejected.What do you see instead?
Instead of returning a promise that’s rejected,
openAsBlob()fails synchronously. This means that instead of using thePromise.catch()method, you have to usetry/catchlogic instead.Additional information
Just marking the function as
asyncon https://github.com/nodejs/node/blob/v25.8.1/lib/fs.js#L570 would fix it.