@adviser/cement 0.2.43 → 0.2.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -2123,7 +2123,14 @@ var LoggerImpl = class _LoggerImpl {
2123
2123
  }
2124
2124
  }
2125
2125
  if (err instanceof Error) {
2126
- this._attributes[key] = logValue(err.message, toLogValueCtx(this.levelHandler));
2126
+ if (err.cause) {
2127
+ this.coerceKey(key, {
2128
+ message: err.message,
2129
+ cause: err.cause
2130
+ });
2131
+ } else {
2132
+ this._attributes[key] = logValue(err.message, toLogValueCtx(this.levelHandler));
2133
+ }
2127
2134
  if (this.levelHandler.isStackExposed) {
2128
2135
  this._attributes["stack"] = logValue(
2129
2136
  (_a = err.stack) == null ? void 0 : _a.split("\n").map((s) => s.trim()),