Skip to content

Commit 015842f

Browse files
deokjinkimruyadorno
authored andcommitted
doc: use console.error for error case in http2
console.error is more suitable than console.log for error case. PR-URL: #45577 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]>
1 parent c3fe907 commit 015842f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/http2.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ let http2;
4343
try {
4444
http2 = require('node:http2');
4545
} catch (err) {
46-
console.log('http2 support is disabled!');
46+
console.error('http2 support is disabled!');
4747
}
4848
```
4949

@@ -61,7 +61,7 @@ let http2;
6161
try {
6262
http2 = await import('node:http2');
6363
} catch (err) {
64-
console.log('http2 support is disabled!');
64+
console.error('http2 support is disabled!');
6565
}
6666
```
6767

@@ -1850,7 +1850,7 @@ server.on('stream', (stream) => {
18501850
}
18511851
} catch (err) {
18521852
// Perform actual error handling.
1853-
console.log(err);
1853+
console.error(err);
18541854
}
18551855
stream.end();
18561856
}

0 commit comments

Comments
 (0)