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 <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Daeyeon Jeong <[email protected]>
  • Loading branch information
deokjinkim authored and danielleadams committed Jan 5, 2023
1 parent 3f2caaf commit 5fd88ac
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 5fd88ac

Please sign in to comment.