Skip to content

Commit 7198372

Browse files
Napalysasgerf
andcommitted
Update javascript/ql/src/Quality/UnhandledStreamPipe.qhelp
Co-authored-by: Asger F <asgerf@github.com>
1 parent abd446a commit 7198372

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/ql/src/Quality/UnhandledStreamPipe.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ In Node.js, calling the <code>pipe()</code> method on a stream without proper er
1111

1212
<recommendation>
1313
<p>
14-
Instead of using <code>pipe()</code> with manual error handling, prefer using the <code>pipeline</code> function from the Node.js stream module. The <code>pipeline</code> function automatically handles errors and ensures proper cleanup of resources. This approach is more robust and eliminates the risk of forgetting to handle errors.
14+
Instead of using <code>pipe()</code> with manual error handling, prefer using the <code>pipeline</code> function from the Node.js <code>stream</code> module. The <code>pipeline</code> function automatically handles errors and ensures proper cleanup of resources. This approach is more robust and eliminates the risk of forgetting to handle errors.
1515
</p>
1616
<p>
1717
If you must use <code>pipe()</code>, always attach an error handler to the source stream using methods like <code>on('error', handler)</code> to ensure that any errors during the streaming process are properly handled.

0 commit comments

Comments
 (0)