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

[DOC] : Error Handling Missing in fs.copyFile() Documentation #52916

Open
SSameer20 opened this issue May 9, 2024 · 1 comment
Open

[DOC] : Error Handling Missing in fs.copyFile() Documentation #52916

SSameer20 opened this issue May 9, 2024 · 1 comment
Labels
doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system.

Comments

@SSameer20
Copy link

SSameer20 commented May 9, 2024

Error Handling Missing in fs.copyFile Callback Documentation

node-doc-1

Description

The Node.js documentation for the fs.copyFile() method lacks information about potential errors that may occur in the callback function. Specifically, there is no mention of how errors within the callback are handled.

Context

When using the fs.copyFile() method in Node.js, developers rely on the documentation to understand how to handle potential errors. However, the current documentation does not adequately address error handling within the callback function.
node-doc-2

Expected Behavior

The documentation for fs.copyFile() should provide information about potential errors that may occur within the callback function, along with guidance on how to handle them.
image

Actual Behavior

The documentation does not mention anything about errors that may occur within the callback function.

error

Steps to Reproduce (if applicable)

  1. Refer to the Node.js documentation for https://nodejs.org/api/fs.html#fscopyfilesrc-dest-mode-callback.
  2. Note the absence of information regarding error handling within the callback function.
@marco-ippolito
Copy link
Member

That is because it depends on the platform on which you are running Node.js, it wouldn't make sense to list all possible errors of all the platform supported.
PR's to improve documentation are always welcome

@mertcanaltin mertcanaltin added the doc Issues and PRs related to the documentations. label May 9, 2024
@RedYetiDev RedYetiDev added the fs Issues and PRs related to the fs subsystem / file system. label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

No branches or pull requests

4 participants