ai-lens 0.8.48 → 0.8.49
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/.commithash +1 -1
- package/client/sender.js +7 -1
- package/package.json +1 -1
package/.commithash
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
b5da117
|
package/client/sender.js
CHANGED
|
@@ -670,7 +670,13 @@ async function main() {
|
|
|
670
670
|
events.filter(e => !sentEventIds.has(e.event_id)).map(e => e.event_id).filter(Boolean)
|
|
671
671
|
);
|
|
672
672
|
partialRollback(sendingDir, acquiredPendingDir, unsentIds, eventFileMap);
|
|
673
|
-
|
|
673
|
+
// Node.js fetch wraps the real error in err.cause (e.g. DNS, TLS, ECONNREFUSED).
|
|
674
|
+
// Log both so sender.log shows the actual root cause, not just "fetch failed".
|
|
675
|
+
const cause = err.cause;
|
|
676
|
+
const errorDetail = cause
|
|
677
|
+
? { message: cause.message, code: cause.code, ...(cause.cause ? { inner: cause.cause.message, innerCode: cause.cause.code } : {}) }
|
|
678
|
+
: undefined;
|
|
679
|
+
log({ msg: 'failed', error: err.message, ...(errorDetail ? { cause: errorDetail } : {}), sent: sentEventIds.size, unsent: unsentIds.size, server: serverUrl });
|
|
674
680
|
if (err.message.includes('401')) {
|
|
675
681
|
log({ msg: 'auth-failed', error: 'Token invalid or revoked. Run: npx -y ai-lens init' });
|
|
676
682
|
}
|