diff --git a/doc/api/timers.md b/doc/api/timers.md index 21d8213eb71763..5fe5a6943adc48 100644 --- a/doc/api/timers.md +++ b/doc/api/timers.md @@ -278,7 +278,7 @@ setImmediatePromise('foobar', { signal }) .then(console.log) .catch((err) => { if (err.name === 'AbortError') - console.log('The immediate was aborted'); + console.error('The immediate was aborted'); }); ac.abort(); @@ -296,7 +296,7 @@ setTimeoutPromise(1000, 'foobar', { signal }) .then(console.log) .catch((err) => { if (err.name === 'AbortError') - console.log('The timeout was aborted'); + console.error('The timeout was aborted'); }); ac.abort(); diff --git a/doc/api/tls.md b/doc/api/tls.md index 00ba977db7b243..4c0ad5f497ba07 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -29,7 +29,7 @@ let tls; try { tls = require('node:tls'); } catch (err) { - console.log('tls support is disabled!'); + console.error('tls support is disabled!'); } ``` @@ -47,7 +47,7 @@ let tls; try { tls = await import('node:tls'); } catch (err) { - console.log('tls support is disabled!'); + console.error('tls support is disabled!'); } ```