Skip to content

Commit

Permalink
fix: fixed logger issue
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Jan 28, 2025
1 parent dcd91c9 commit e784466
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,8 @@ If you are provisioning servers after IPMI/VPN access, then you may need to take
> Replace `IPV4_GOES_HERE` with IPv4 address, `IPV6_GOES_HERE` with IPv6 address, `IPV6_GATEWAY` with IPv6 gateway, and `IPV4_GATEWAY` with IPV4 gateway:
> For a comparison of `802.3ad` and other parameter mode values such as `balance-rr`, [please see this article on ServerFault](https://serverfault.com/a/481271).
```sh
# This is the network config written by 'subiquity'
network:
Expand All @@ -680,7 +682,7 @@ If you are provisioning servers after IPMI/VPN access, then you may need to take
- 2606:4700:4700::1001
search: []
parameters:
mode: balance-rr
mode: 802.3ad
routes:
- to: ::/0
via: IPV6_GATEWAY
Expand Down
4 changes: 2 additions & 2 deletions helpers/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const silentSymbol = Symbol.for('axe.silent');
const connectionNameSymbol = Symbol.for('connection.name');

// wrapper for browser condition
const hasMixin = !_.isEmpty(mongoose) && _ && _.mixin;
const hasMixin = mongoose && _ && _.mixin;

if (hasMixin) {
// <https://stackoverflow.com/a/41978063>
Expand Down Expand Up @@ -158,7 +158,7 @@ async function hook(err, message, meta) {
if (err && err.message === 'read ECONNRESET') return;

// wrapper for non-browser condition
if (!_.isEmpty(mongoose)) {
if (mongoose) {
// if it was SSL/TLS/socket error then ignore it
if (isTLSError(err) || isSSLError(err) || isSocketError(err)) return;

Expand Down

0 comments on commit e784466

Please sign in to comment.