Skip to content

Commit

Permalink
fix: update log messages (#2324)
Browse files Browse the repository at this point in the history
Ensure the log messages make sense
  • Loading branch information
achingbrain authored Dec 18, 2023
1 parent ad6f70b commit 984f13e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/libp2p/src/upgrader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,8 @@ export class DefaultUpgrader implements Upgrader {
protocol
}
} catch (err: any) {
throw new CodeError(String(err), codes.ERR_ENCRYPTION_FAILED)
connection.log.error('encrypting inbound connection to %p failed', err)
throw new CodeError(err.message, codes.ERR_ENCRYPTION_FAILED)
}
}

Expand Down Expand Up @@ -677,7 +678,8 @@ export class DefaultUpgrader implements Upgrader {
protocol
}
} catch (err: any) {
throw new CodeError(String(err), codes.ERR_ENCRYPTION_FAILED)
connection.log.error('encrypting outbound connection to %p failed', err)
throw new CodeError(err.message, codes.ERR_ENCRYPTION_FAILED)
}
}

Expand Down

0 comments on commit 984f13e

Please sign in to comment.