Skip to content

Commit 30a8604

Browse files
deokjinkimdanielleadams
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 <rafael.nunu@hotmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
1 parent 3e87834 commit 30a8604

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)