Skip to content

Commit

Permalink
doc: use console.error for error case in http2
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
deokjinkim authored and ruyadorno committed Nov 24, 2022
1 parent c3fe907 commit 015842f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let http2;
try {
http2 = require('node:http2');
} catch (err) {
console.log('http2 support is disabled!');
console.error('http2 support is disabled!');
}
```

Expand All @@ -61,7 +61,7 @@ let http2;
try {
http2 = await import('node:http2');
} catch (err) {
console.log('http2 support is disabled!');
console.error('http2 support is disabled!');
}
```

Expand Down Expand Up @@ -1850,7 +1850,7 @@ server.on('stream', (stream) => {
}
} catch (err) {
// Perform actual error handling.
console.log(err);
console.error(err);
}
stream.end();
}
Expand Down

0 comments on commit 015842f

Please sign in to comment.