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 danielleadams committed Jan 3, 2023
1 parent 3e87834 commit 30a8604
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 30a8604

Please sign in to comment.