roster-server 2.3.2 → 2.3.4
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.
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: zskjlbshg2
|
|
3
|
+
type: bugfix
|
|
4
|
+
title: 'Bugfix: Harden Greenlock notify logging fallback'
|
|
5
|
+
created: '2026-03-16 15:54:09'
|
|
6
|
+
---
|
|
7
|
+
# Bug: Greenlock notify emitted unhelpful error logs
|
|
8
|
+
|
|
9
|
+
**Symptom**: Log lines such as `roster:error ----` appeared, indicating error events with missing/invalid details.
|
|
10
|
+
**Root cause**: `notify` used `details?.message ?? JSON.stringify(details)`, which could produce `undefined` (or throw on non-serializable data), resulting in low-signal logger output.
|
|
11
|
+
**Solution**: Added robust message normalization in `notify` to handle strings, `Error` instances, plain objects, and serialization failures, then fallback to `[{event}] (no details)` when empty.
|
|
12
|
+
**Location**: index.js notify callback inside Greenlock options.
|
package/index.js
CHANGED
|
@@ -736,7 +736,21 @@ class Roster {
|
|
|
736
736
|
cluster: this.cluster,
|
|
737
737
|
staging: this.staging,
|
|
738
738
|
notify: (event, details) => {
|
|
739
|
-
|
|
739
|
+
let msg;
|
|
740
|
+
if (typeof details === 'string') {
|
|
741
|
+
msg = details;
|
|
742
|
+
} else if (details instanceof Error) {
|
|
743
|
+
msg = details.stack || details.message;
|
|
744
|
+
} else if (details && typeof details === 'object' && typeof details.message === 'string') {
|
|
745
|
+
msg = details.message;
|
|
746
|
+
} else {
|
|
747
|
+
try {
|
|
748
|
+
msg = JSON.stringify(details);
|
|
749
|
+
} catch {
|
|
750
|
+
msg = String(details);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
if (!msg || msg === 'undefined') msg = `[${event}] (no details)`;
|
|
740
754
|
// Suppress known benign warnings from ACME when using acme-dns-01-cli
|
|
741
755
|
if (event === 'warning' && typeof msg === 'string') {
|
|
742
756
|
if (/acme-dns-01-cli.*(incorrect function signatures|deprecated use of callbacks)/i.test(msg)) return;
|