@adaptic/backend-legacy 0.0.960 → 0.0.962
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/ABTest.cjs +180 -66
- package/Account.cjs +180 -66
- package/AccountDecisionRecord.cjs +180 -66
- package/AccountLinkingRequest.cjs +180 -66
- package/Action.cjs +180 -66
- package/Alert.cjs +180 -66
- package/Allocation.cjs +180 -66
- package/AlpacaAccount.cjs +180 -66
- package/AnalyticsConfiguration.cjs +180 -66
- package/AnalyticsSnapshot.cjs +180 -66
- package/Asset.cjs +180 -66
- package/AuditLog.cjs +180 -66
- package/Authenticator.cjs +180 -66
- package/Configuration.cjs +180 -66
- package/ConflictEvent.cjs +180 -66
- package/ConnectionHealthSnapshot.cjs +180 -66
- package/Customer.cjs +180 -66
- package/DeadLetterMessage.cjs +180 -66
- package/DecisionMemorySummary.cjs +180 -66
- package/EconomicEvent.cjs +180 -66
- package/EquityBar.cjs +180 -66
- package/Event.cjs +180 -66
- package/EventSnapshot.cjs +180 -66
- package/FeatureImportanceAnalysis.cjs +180 -66
- package/InstitutionalFlowSignal.cjs +180 -66
- package/InstitutionalHolding.cjs +180 -66
- package/InstitutionalSentimentAlerts.cjs +180 -66
- package/InstitutionalSentimentErrors.cjs +180 -66
- package/InstitutionalSentimentHistory.cjs +180 -66
- package/InstitutionalSentimentMetrics.cjs +180 -66
- package/InviteToken.cjs +180 -66
- package/LinkedProvider.cjs +180 -66
- package/LlmConfiguration.cjs +180 -66
- package/MLModelVersion.cjs +180 -66
- package/MLTrainingData.cjs +180 -66
- package/MarketSentiment.cjs +180 -66
- package/ModelArtifact.cjs +180 -66
- package/ModelVersion.cjs +180 -66
- package/ModelVersionArtifact.cjs +180 -66
- package/NewsArticle.cjs +180 -66
- package/NewsArticleAssetSentiment.cjs +180 -66
- package/OptionsContract.cjs +180 -66
- package/OptionsGreeksHistory.cjs +180 -66
- package/OptionsPosition.cjs +180 -66
- package/OptionsPositionEvent.cjs +180 -66
- package/OptionsTradeExecution.cjs +180 -66
- package/PolicyOverlay.cjs +180 -66
- package/PortfolioGreeksHistory.cjs +180 -66
- package/ScheduledOptionOrder.cjs +180 -66
- package/Session.cjs +180 -66
- package/SignalGeneratorMetrics.cjs +180 -66
- package/SignalLineage.cjs +180 -66
- package/SignalOutcome.cjs +180 -66
- package/SignalPriorityQueue.cjs +180 -66
- package/SyncEvent.cjs +180 -66
- package/SystemAlert.cjs +180 -66
- package/Trade.cjs +180 -66
- package/TradeAuditEvent.cjs +180 -66
- package/TradeExecutionHistory.cjs +180 -66
- package/TradeOutcome.cjs +180 -66
- package/TradingPolicy.cjs +180 -66
- package/User.cjs +180 -66
- package/VerificationToken.cjs +180 -66
- package/WaitlistEntry.cjs +180 -66
- package/client.cjs +131 -9
- package/client.d.ts +32 -0
- package/esm/ABTest.d.ts.map +1 -1
- package/esm/ABTest.js.map +1 -1
- package/esm/ABTest.mjs +180 -66
- package/esm/Account.d.ts.map +1 -1
- package/esm/Account.js.map +1 -1
- package/esm/Account.mjs +180 -66
- package/esm/AccountDecisionRecord.d.ts.map +1 -1
- package/esm/AccountDecisionRecord.js.map +1 -1
- package/esm/AccountDecisionRecord.mjs +180 -66
- package/esm/AccountLinkingRequest.d.ts.map +1 -1
- package/esm/AccountLinkingRequest.js.map +1 -1
- package/esm/AccountLinkingRequest.mjs +180 -66
- package/esm/Action.d.ts.map +1 -1
- package/esm/Action.js.map +1 -1
- package/esm/Action.mjs +180 -66
- package/esm/Alert.d.ts.map +1 -1
- package/esm/Alert.js.map +1 -1
- package/esm/Alert.mjs +180 -66
- package/esm/Allocation.d.ts.map +1 -1
- package/esm/Allocation.js.map +1 -1
- package/esm/Allocation.mjs +180 -66
- package/esm/AlpacaAccount.d.ts.map +1 -1
- package/esm/AlpacaAccount.js.map +1 -1
- package/esm/AlpacaAccount.mjs +180 -66
- package/esm/AnalyticsConfiguration.d.ts.map +1 -1
- package/esm/AnalyticsConfiguration.js.map +1 -1
- package/esm/AnalyticsConfiguration.mjs +180 -66
- package/esm/AnalyticsSnapshot.d.ts.map +1 -1
- package/esm/AnalyticsSnapshot.js.map +1 -1
- package/esm/AnalyticsSnapshot.mjs +180 -66
- package/esm/Asset.d.ts.map +1 -1
- package/esm/Asset.js.map +1 -1
- package/esm/Asset.mjs +180 -66
- package/esm/AuditLog.d.ts.map +1 -1
- package/esm/AuditLog.js.map +1 -1
- package/esm/AuditLog.mjs +180 -66
- package/esm/Authenticator.d.ts.map +1 -1
- package/esm/Authenticator.js.map +1 -1
- package/esm/Authenticator.mjs +180 -66
- package/esm/Configuration.d.ts.map +1 -1
- package/esm/Configuration.js.map +1 -1
- package/esm/Configuration.mjs +180 -66
- package/esm/ConflictEvent.d.ts.map +1 -1
- package/esm/ConflictEvent.js.map +1 -1
- package/esm/ConflictEvent.mjs +180 -66
- package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
- package/esm/ConnectionHealthSnapshot.js.map +1 -1
- package/esm/ConnectionHealthSnapshot.mjs +180 -66
- package/esm/Customer.d.ts.map +1 -1
- package/esm/Customer.js.map +1 -1
- package/esm/Customer.mjs +180 -66
- package/esm/DeadLetterMessage.d.ts.map +1 -1
- package/esm/DeadLetterMessage.js.map +1 -1
- package/esm/DeadLetterMessage.mjs +180 -66
- package/esm/DecisionMemorySummary.d.ts.map +1 -1
- package/esm/DecisionMemorySummary.js.map +1 -1
- package/esm/DecisionMemorySummary.mjs +180 -66
- package/esm/EconomicEvent.d.ts.map +1 -1
- package/esm/EconomicEvent.js.map +1 -1
- package/esm/EconomicEvent.mjs +180 -66
- package/esm/EquityBar.d.ts.map +1 -1
- package/esm/EquityBar.js.map +1 -1
- package/esm/EquityBar.mjs +180 -66
- package/esm/Event.d.ts.map +1 -1
- package/esm/Event.js.map +1 -1
- package/esm/Event.mjs +180 -66
- package/esm/EventSnapshot.d.ts.map +1 -1
- package/esm/EventSnapshot.js.map +1 -1
- package/esm/EventSnapshot.mjs +180 -66
- package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
- package/esm/FeatureImportanceAnalysis.js.map +1 -1
- package/esm/FeatureImportanceAnalysis.mjs +180 -66
- package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
- package/esm/InstitutionalFlowSignal.js.map +1 -1
- package/esm/InstitutionalFlowSignal.mjs +180 -66
- package/esm/InstitutionalHolding.d.ts.map +1 -1
- package/esm/InstitutionalHolding.js.map +1 -1
- package/esm/InstitutionalHolding.mjs +180 -66
- package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
- package/esm/InstitutionalSentimentAlerts.js.map +1 -1
- package/esm/InstitutionalSentimentAlerts.mjs +180 -66
- package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
- package/esm/InstitutionalSentimentErrors.js.map +1 -1
- package/esm/InstitutionalSentimentErrors.mjs +180 -66
- package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
- package/esm/InstitutionalSentimentHistory.js.map +1 -1
- package/esm/InstitutionalSentimentHistory.mjs +180 -66
- package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
- package/esm/InstitutionalSentimentMetrics.js.map +1 -1
- package/esm/InstitutionalSentimentMetrics.mjs +180 -66
- package/esm/InviteToken.d.ts.map +1 -1
- package/esm/InviteToken.js.map +1 -1
- package/esm/InviteToken.mjs +180 -66
- package/esm/LinkedProvider.d.ts.map +1 -1
- package/esm/LinkedProvider.js.map +1 -1
- package/esm/LinkedProvider.mjs +180 -66
- package/esm/LlmConfiguration.d.ts.map +1 -1
- package/esm/LlmConfiguration.js.map +1 -1
- package/esm/LlmConfiguration.mjs +180 -66
- package/esm/MLModelVersion.d.ts.map +1 -1
- package/esm/MLModelVersion.js.map +1 -1
- package/esm/MLModelVersion.mjs +180 -66
- package/esm/MLTrainingData.d.ts.map +1 -1
- package/esm/MLTrainingData.js.map +1 -1
- package/esm/MLTrainingData.mjs +180 -66
- package/esm/MarketSentiment.d.ts.map +1 -1
- package/esm/MarketSentiment.js.map +1 -1
- package/esm/MarketSentiment.mjs +180 -66
- package/esm/ModelArtifact.d.ts.map +1 -1
- package/esm/ModelArtifact.js.map +1 -1
- package/esm/ModelArtifact.mjs +180 -66
- package/esm/ModelVersion.d.ts.map +1 -1
- package/esm/ModelVersion.js.map +1 -1
- package/esm/ModelVersion.mjs +180 -66
- package/esm/ModelVersionArtifact.d.ts.map +1 -1
- package/esm/ModelVersionArtifact.js.map +1 -1
- package/esm/ModelVersionArtifact.mjs +180 -66
- package/esm/NewsArticle.d.ts.map +1 -1
- package/esm/NewsArticle.js.map +1 -1
- package/esm/NewsArticle.mjs +180 -66
- package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/esm/NewsArticleAssetSentiment.js.map +1 -1
- package/esm/NewsArticleAssetSentiment.mjs +180 -66
- package/esm/OptionsContract.d.ts.map +1 -1
- package/esm/OptionsContract.js.map +1 -1
- package/esm/OptionsContract.mjs +180 -66
- package/esm/OptionsGreeksHistory.d.ts.map +1 -1
- package/esm/OptionsGreeksHistory.js.map +1 -1
- package/esm/OptionsGreeksHistory.mjs +180 -66
- package/esm/OptionsPosition.d.ts.map +1 -1
- package/esm/OptionsPosition.js.map +1 -1
- package/esm/OptionsPosition.mjs +180 -66
- package/esm/OptionsPositionEvent.d.ts.map +1 -1
- package/esm/OptionsPositionEvent.js.map +1 -1
- package/esm/OptionsPositionEvent.mjs +180 -66
- package/esm/OptionsTradeExecution.d.ts.map +1 -1
- package/esm/OptionsTradeExecution.js.map +1 -1
- package/esm/OptionsTradeExecution.mjs +180 -66
- package/esm/PolicyOverlay.d.ts.map +1 -1
- package/esm/PolicyOverlay.js.map +1 -1
- package/esm/PolicyOverlay.mjs +180 -66
- package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
- package/esm/PortfolioGreeksHistory.js.map +1 -1
- package/esm/PortfolioGreeksHistory.mjs +180 -66
- package/esm/ScheduledOptionOrder.d.ts.map +1 -1
- package/esm/ScheduledOptionOrder.js.map +1 -1
- package/esm/ScheduledOptionOrder.mjs +180 -66
- package/esm/Session.d.ts.map +1 -1
- package/esm/Session.js.map +1 -1
- package/esm/Session.mjs +180 -66
- package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
- package/esm/SignalGeneratorMetrics.js.map +1 -1
- package/esm/SignalGeneratorMetrics.mjs +180 -66
- package/esm/SignalLineage.d.ts.map +1 -1
- package/esm/SignalLineage.js.map +1 -1
- package/esm/SignalLineage.mjs +180 -66
- package/esm/SignalOutcome.d.ts.map +1 -1
- package/esm/SignalOutcome.js.map +1 -1
- package/esm/SignalOutcome.mjs +180 -66
- package/esm/SignalPriorityQueue.d.ts.map +1 -1
- package/esm/SignalPriorityQueue.js.map +1 -1
- package/esm/SignalPriorityQueue.mjs +180 -66
- package/esm/SyncEvent.d.ts.map +1 -1
- package/esm/SyncEvent.js.map +1 -1
- package/esm/SyncEvent.mjs +180 -66
- package/esm/SystemAlert.d.ts.map +1 -1
- package/esm/SystemAlert.js.map +1 -1
- package/esm/SystemAlert.mjs +180 -66
- package/esm/Trade.d.ts.map +1 -1
- package/esm/Trade.js.map +1 -1
- package/esm/Trade.mjs +180 -66
- package/esm/TradeAuditEvent.d.ts.map +1 -1
- package/esm/TradeAuditEvent.js.map +1 -1
- package/esm/TradeAuditEvent.mjs +180 -66
- package/esm/TradeExecutionHistory.d.ts.map +1 -1
- package/esm/TradeExecutionHistory.js.map +1 -1
- package/esm/TradeExecutionHistory.mjs +180 -66
- package/esm/TradeOutcome.d.ts.map +1 -1
- package/esm/TradeOutcome.js.map +1 -1
- package/esm/TradeOutcome.mjs +180 -66
- package/esm/TradingPolicy.d.ts.map +1 -1
- package/esm/TradingPolicy.js.map +1 -1
- package/esm/TradingPolicy.mjs +180 -66
- package/esm/User.d.ts.map +1 -1
- package/esm/User.js.map +1 -1
- package/esm/User.mjs +180 -66
- package/esm/VerificationToken.d.ts.map +1 -1
- package/esm/VerificationToken.js.map +1 -1
- package/esm/VerificationToken.mjs +180 -66
- package/esm/WaitlistEntry.d.ts.map +1 -1
- package/esm/WaitlistEntry.js.map +1 -1
- package/esm/WaitlistEntry.mjs +180 -66
- package/esm/client.d.ts +32 -0
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js.map +1 -1
- package/esm/client.mjs +130 -9
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/index.mjs +1 -1
- package/index.cjs +2 -1
- package/index.d.ts +2 -2
- package/package.json +1 -1
package/SyncEvent.cjs
CHANGED
|
@@ -148,13 +148,28 @@ exports.SyncEvent = {
|
|
|
148
148
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
149
149
|
continue;
|
|
150
150
|
}
|
|
151
|
-
// Log structured error details and rethrow
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
151
|
+
// Log structured error details and rethrow.
|
|
152
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
153
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
154
|
+
// from true defects.
|
|
155
|
+
if (isConnectionError) {
|
|
156
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
157
|
+
operation: 'createOneSyncEvent',
|
|
158
|
+
model: 'SyncEvent',
|
|
159
|
+
error: String(error),
|
|
160
|
+
isRetryable: true,
|
|
161
|
+
transient: true,
|
|
162
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
logger_1.logger.error("Database create operation failed", {
|
|
167
|
+
operation: 'createOneSyncEvent',
|
|
168
|
+
model: 'SyncEvent',
|
|
169
|
+
error: String(error),
|
|
170
|
+
isRetryable: false,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
158
173
|
throw error;
|
|
159
174
|
}
|
|
160
175
|
}
|
|
@@ -281,13 +296,25 @@ exports.SyncEvent = {
|
|
|
281
296
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
282
297
|
continue;
|
|
283
298
|
}
|
|
284
|
-
// Log structured error details and rethrow
|
|
285
|
-
|
|
286
|
-
operation
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
299
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
300
|
+
if (isConnectionError) {
|
|
301
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
302
|
+
operation: 'createManySyncEvent',
|
|
303
|
+
model: 'SyncEvent',
|
|
304
|
+
error: String(error),
|
|
305
|
+
isRetryable: true,
|
|
306
|
+
transient: true,
|
|
307
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
312
|
+
operation: 'createManySyncEvent',
|
|
313
|
+
model: 'SyncEvent',
|
|
314
|
+
error: String(error),
|
|
315
|
+
isRetryable: false,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
291
318
|
throw error;
|
|
292
319
|
}
|
|
293
320
|
}
|
|
@@ -437,14 +464,27 @@ exports.SyncEvent = {
|
|
|
437
464
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
438
465
|
continue;
|
|
439
466
|
}
|
|
440
|
-
// Log structured error details and rethrow
|
|
441
|
-
|
|
442
|
-
operation
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
467
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
468
|
+
if (isConnectionError) {
|
|
469
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
470
|
+
operation: 'updateOneSyncEvent',
|
|
471
|
+
model: 'SyncEvent',
|
|
472
|
+
error: String(error),
|
|
473
|
+
recordId: props.id,
|
|
474
|
+
isRetryable: true,
|
|
475
|
+
transient: true,
|
|
476
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
logger_1.logger.error("Database update operation failed", {
|
|
481
|
+
operation: 'updateOneSyncEvent',
|
|
482
|
+
model: 'SyncEvent',
|
|
483
|
+
error: String(error),
|
|
484
|
+
recordId: props.id,
|
|
485
|
+
isRetryable: false,
|
|
486
|
+
});
|
|
487
|
+
}
|
|
448
488
|
throw error;
|
|
449
489
|
}
|
|
450
490
|
}
|
|
@@ -608,14 +648,27 @@ exports.SyncEvent = {
|
|
|
608
648
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
609
649
|
continue;
|
|
610
650
|
}
|
|
611
|
-
// Log structured error details and rethrow
|
|
612
|
-
|
|
613
|
-
operation
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
651
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
652
|
+
if (isConnectionError) {
|
|
653
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
654
|
+
operation: 'upsertOneSyncEvent',
|
|
655
|
+
model: 'SyncEvent',
|
|
656
|
+
error: String(error),
|
|
657
|
+
recordId: props.id,
|
|
658
|
+
isRetryable: true,
|
|
659
|
+
transient: true,
|
|
660
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
else {
|
|
664
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
665
|
+
operation: 'upsertOneSyncEvent',
|
|
666
|
+
model: 'SyncEvent',
|
|
667
|
+
error: String(error),
|
|
668
|
+
recordId: props.id,
|
|
669
|
+
isRetryable: false,
|
|
670
|
+
});
|
|
671
|
+
}
|
|
619
672
|
throw error;
|
|
620
673
|
}
|
|
621
674
|
}
|
|
@@ -763,13 +816,25 @@ exports.SyncEvent = {
|
|
|
763
816
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
764
817
|
continue;
|
|
765
818
|
}
|
|
766
|
-
// Log structured error details and rethrow
|
|
767
|
-
|
|
768
|
-
operation
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
819
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
820
|
+
if (isConnectionError) {
|
|
821
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
822
|
+
operation: 'updateManySyncEvent',
|
|
823
|
+
model: 'SyncEvent',
|
|
824
|
+
error: String(error),
|
|
825
|
+
isRetryable: true,
|
|
826
|
+
transient: true,
|
|
827
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
else {
|
|
831
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
832
|
+
operation: 'updateManySyncEvent',
|
|
833
|
+
model: 'SyncEvent',
|
|
834
|
+
error: String(error),
|
|
835
|
+
isRetryable: false,
|
|
836
|
+
});
|
|
837
|
+
}
|
|
773
838
|
throw error;
|
|
774
839
|
}
|
|
775
840
|
}
|
|
@@ -892,14 +957,27 @@ exports.SyncEvent = {
|
|
|
892
957
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
893
958
|
continue;
|
|
894
959
|
}
|
|
895
|
-
// Log structured error details and rethrow
|
|
896
|
-
|
|
897
|
-
operation
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
960
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
961
|
+
if (isConnectionError) {
|
|
962
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
963
|
+
operation: 'deleteOneSyncEvent',
|
|
964
|
+
model: 'SyncEvent',
|
|
965
|
+
error: String(error),
|
|
966
|
+
recordId: props.id,
|
|
967
|
+
isRetryable: true,
|
|
968
|
+
transient: true,
|
|
969
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
else {
|
|
973
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
974
|
+
operation: 'deleteOneSyncEvent',
|
|
975
|
+
model: 'SyncEvent',
|
|
976
|
+
error: String(error),
|
|
977
|
+
recordId: props.id,
|
|
978
|
+
isRetryable: false,
|
|
979
|
+
});
|
|
980
|
+
}
|
|
903
981
|
throw error;
|
|
904
982
|
}
|
|
905
983
|
}
|
|
@@ -1001,13 +1079,25 @@ exports.SyncEvent = {
|
|
|
1001
1079
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1002
1080
|
continue;
|
|
1003
1081
|
}
|
|
1004
|
-
// Log structured error details and rethrow
|
|
1005
|
-
|
|
1006
|
-
operation
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1082
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1083
|
+
if (isConnectionError) {
|
|
1084
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1085
|
+
operation: 'getSyncEvent',
|
|
1086
|
+
model: 'SyncEvent',
|
|
1087
|
+
error: String(error),
|
|
1088
|
+
isRetryable: true,
|
|
1089
|
+
transient: true,
|
|
1090
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
else {
|
|
1094
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1095
|
+
operation: 'getSyncEvent',
|
|
1096
|
+
model: 'SyncEvent',
|
|
1097
|
+
error: String(error),
|
|
1098
|
+
isRetryable: false,
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1011
1101
|
throw error;
|
|
1012
1102
|
}
|
|
1013
1103
|
}
|
|
@@ -1094,13 +1184,25 @@ exports.SyncEvent = {
|
|
|
1094
1184
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1095
1185
|
continue;
|
|
1096
1186
|
}
|
|
1097
|
-
// Log structured error details and rethrow
|
|
1098
|
-
|
|
1099
|
-
operation
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1187
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1188
|
+
if (isConnectionError) {
|
|
1189
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1190
|
+
operation: 'getAllSyncEvent',
|
|
1191
|
+
model: 'SyncEvent',
|
|
1192
|
+
error: String(error),
|
|
1193
|
+
isRetryable: true,
|
|
1194
|
+
transient: true,
|
|
1195
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
else {
|
|
1199
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1200
|
+
operation: 'getAllSyncEvent',
|
|
1201
|
+
model: 'SyncEvent',
|
|
1202
|
+
error: String(error),
|
|
1203
|
+
isRetryable: false,
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1104
1206
|
throw error;
|
|
1105
1207
|
}
|
|
1106
1208
|
}
|
|
@@ -1214,13 +1316,25 @@ exports.SyncEvent = {
|
|
|
1214
1316
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1215
1317
|
continue;
|
|
1216
1318
|
}
|
|
1217
|
-
// Log structured error details and rethrow
|
|
1218
|
-
|
|
1219
|
-
operation
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1319
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1320
|
+
if (isConnectionError) {
|
|
1321
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1322
|
+
operation: 'findManySyncEvent',
|
|
1323
|
+
model: 'SyncEvent',
|
|
1324
|
+
error: String(error),
|
|
1325
|
+
isRetryable: true,
|
|
1326
|
+
transient: true,
|
|
1327
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
else {
|
|
1331
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1332
|
+
operation: 'findManySyncEvent',
|
|
1333
|
+
model: 'SyncEvent',
|
|
1334
|
+
error: String(error),
|
|
1335
|
+
isRetryable: false,
|
|
1336
|
+
});
|
|
1337
|
+
}
|
|
1224
1338
|
throw error;
|
|
1225
1339
|
}
|
|
1226
1340
|
}
|
package/SystemAlert.cjs
CHANGED
|
@@ -172,13 +172,28 @@ exports.SystemAlert = {
|
|
|
172
172
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
173
173
|
continue;
|
|
174
174
|
}
|
|
175
|
-
// Log structured error details and rethrow
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
175
|
+
// Log structured error details and rethrow.
|
|
176
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
177
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
178
|
+
// from true defects.
|
|
179
|
+
if (isConnectionError) {
|
|
180
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
181
|
+
operation: 'createOneSystemAlert',
|
|
182
|
+
model: 'SystemAlert',
|
|
183
|
+
error: String(error),
|
|
184
|
+
isRetryable: true,
|
|
185
|
+
transient: true,
|
|
186
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
logger_1.logger.error("Database create operation failed", {
|
|
191
|
+
operation: 'createOneSystemAlert',
|
|
192
|
+
model: 'SystemAlert',
|
|
193
|
+
error: String(error),
|
|
194
|
+
isRetryable: false,
|
|
195
|
+
});
|
|
196
|
+
}
|
|
182
197
|
throw error;
|
|
183
198
|
}
|
|
184
199
|
}
|
|
@@ -316,13 +331,25 @@ exports.SystemAlert = {
|
|
|
316
331
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
317
332
|
continue;
|
|
318
333
|
}
|
|
319
|
-
// Log structured error details and rethrow
|
|
320
|
-
|
|
321
|
-
operation
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
334
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
335
|
+
if (isConnectionError) {
|
|
336
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
337
|
+
operation: 'createManySystemAlert',
|
|
338
|
+
model: 'SystemAlert',
|
|
339
|
+
error: String(error),
|
|
340
|
+
isRetryable: true,
|
|
341
|
+
transient: true,
|
|
342
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
347
|
+
operation: 'createManySystemAlert',
|
|
348
|
+
model: 'SystemAlert',
|
|
349
|
+
error: String(error),
|
|
350
|
+
isRetryable: false,
|
|
351
|
+
});
|
|
352
|
+
}
|
|
326
353
|
throw error;
|
|
327
354
|
}
|
|
328
355
|
}
|
|
@@ -507,14 +534,27 @@ exports.SystemAlert = {
|
|
|
507
534
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
508
535
|
continue;
|
|
509
536
|
}
|
|
510
|
-
// Log structured error details and rethrow
|
|
511
|
-
|
|
512
|
-
operation
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
537
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
538
|
+
if (isConnectionError) {
|
|
539
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
540
|
+
operation: 'updateOneSystemAlert',
|
|
541
|
+
model: 'SystemAlert',
|
|
542
|
+
error: String(error),
|
|
543
|
+
recordId: props.id,
|
|
544
|
+
isRetryable: true,
|
|
545
|
+
transient: true,
|
|
546
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
logger_1.logger.error("Database update operation failed", {
|
|
551
|
+
operation: 'updateOneSystemAlert',
|
|
552
|
+
model: 'SystemAlert',
|
|
553
|
+
error: String(error),
|
|
554
|
+
recordId: props.id,
|
|
555
|
+
isRetryable: false,
|
|
556
|
+
});
|
|
557
|
+
}
|
|
518
558
|
throw error;
|
|
519
559
|
}
|
|
520
560
|
}
|
|
@@ -724,14 +764,27 @@ exports.SystemAlert = {
|
|
|
724
764
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
725
765
|
continue;
|
|
726
766
|
}
|
|
727
|
-
// Log structured error details and rethrow
|
|
728
|
-
|
|
729
|
-
operation
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
767
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
768
|
+
if (isConnectionError) {
|
|
769
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
770
|
+
operation: 'upsertOneSystemAlert',
|
|
771
|
+
model: 'SystemAlert',
|
|
772
|
+
error: String(error),
|
|
773
|
+
recordId: props.id,
|
|
774
|
+
isRetryable: true,
|
|
775
|
+
transient: true,
|
|
776
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
else {
|
|
780
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
781
|
+
operation: 'upsertOneSystemAlert',
|
|
782
|
+
model: 'SystemAlert',
|
|
783
|
+
error: String(error),
|
|
784
|
+
recordId: props.id,
|
|
785
|
+
isRetryable: false,
|
|
786
|
+
});
|
|
787
|
+
}
|
|
735
788
|
throw error;
|
|
736
789
|
}
|
|
737
790
|
}
|
|
@@ -914,13 +967,25 @@ exports.SystemAlert = {
|
|
|
914
967
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
915
968
|
continue;
|
|
916
969
|
}
|
|
917
|
-
// Log structured error details and rethrow
|
|
918
|
-
|
|
919
|
-
operation
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
970
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
971
|
+
if (isConnectionError) {
|
|
972
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
973
|
+
operation: 'updateManySystemAlert',
|
|
974
|
+
model: 'SystemAlert',
|
|
975
|
+
error: String(error),
|
|
976
|
+
isRetryable: true,
|
|
977
|
+
transient: true,
|
|
978
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
else {
|
|
982
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
983
|
+
operation: 'updateManySystemAlert',
|
|
984
|
+
model: 'SystemAlert',
|
|
985
|
+
error: String(error),
|
|
986
|
+
isRetryable: false,
|
|
987
|
+
});
|
|
988
|
+
}
|
|
924
989
|
throw error;
|
|
925
990
|
}
|
|
926
991
|
}
|
|
@@ -1043,14 +1108,27 @@ exports.SystemAlert = {
|
|
|
1043
1108
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1044
1109
|
continue;
|
|
1045
1110
|
}
|
|
1046
|
-
// Log structured error details and rethrow
|
|
1047
|
-
|
|
1048
|
-
operation
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1111
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1112
|
+
if (isConnectionError) {
|
|
1113
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1114
|
+
operation: 'deleteOneSystemAlert',
|
|
1115
|
+
model: 'SystemAlert',
|
|
1116
|
+
error: String(error),
|
|
1117
|
+
recordId: props.id,
|
|
1118
|
+
isRetryable: true,
|
|
1119
|
+
transient: true,
|
|
1120
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
else {
|
|
1124
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1125
|
+
operation: 'deleteOneSystemAlert',
|
|
1126
|
+
model: 'SystemAlert',
|
|
1127
|
+
error: String(error),
|
|
1128
|
+
recordId: props.id,
|
|
1129
|
+
isRetryable: false,
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1054
1132
|
throw error;
|
|
1055
1133
|
}
|
|
1056
1134
|
}
|
|
@@ -1158,13 +1236,25 @@ exports.SystemAlert = {
|
|
|
1158
1236
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1159
1237
|
continue;
|
|
1160
1238
|
}
|
|
1161
|
-
// Log structured error details and rethrow
|
|
1162
|
-
|
|
1163
|
-
operation
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1239
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1240
|
+
if (isConnectionError) {
|
|
1241
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1242
|
+
operation: 'getSystemAlert',
|
|
1243
|
+
model: 'SystemAlert',
|
|
1244
|
+
error: String(error),
|
|
1245
|
+
isRetryable: true,
|
|
1246
|
+
transient: true,
|
|
1247
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1250
|
+
else {
|
|
1251
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1252
|
+
operation: 'getSystemAlert',
|
|
1253
|
+
model: 'SystemAlert',
|
|
1254
|
+
error: String(error),
|
|
1255
|
+
isRetryable: false,
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1168
1258
|
throw error;
|
|
1169
1259
|
}
|
|
1170
1260
|
}
|
|
@@ -1251,13 +1341,25 @@ exports.SystemAlert = {
|
|
|
1251
1341
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1252
1342
|
continue;
|
|
1253
1343
|
}
|
|
1254
|
-
// Log structured error details and rethrow
|
|
1255
|
-
|
|
1256
|
-
operation
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1344
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1345
|
+
if (isConnectionError) {
|
|
1346
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1347
|
+
operation: 'getAllSystemAlert',
|
|
1348
|
+
model: 'SystemAlert',
|
|
1349
|
+
error: String(error),
|
|
1350
|
+
isRetryable: true,
|
|
1351
|
+
transient: true,
|
|
1352
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1355
|
+
else {
|
|
1356
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1357
|
+
operation: 'getAllSystemAlert',
|
|
1358
|
+
model: 'SystemAlert',
|
|
1359
|
+
error: String(error),
|
|
1360
|
+
isRetryable: false,
|
|
1361
|
+
});
|
|
1362
|
+
}
|
|
1261
1363
|
throw error;
|
|
1262
1364
|
}
|
|
1263
1365
|
}
|
|
@@ -1377,13 +1479,25 @@ exports.SystemAlert = {
|
|
|
1377
1479
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1378
1480
|
continue;
|
|
1379
1481
|
}
|
|
1380
|
-
// Log structured error details and rethrow
|
|
1381
|
-
|
|
1382
|
-
operation
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1482
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1483
|
+
if (isConnectionError) {
|
|
1484
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1485
|
+
operation: 'findManySystemAlert',
|
|
1486
|
+
model: 'SystemAlert',
|
|
1487
|
+
error: String(error),
|
|
1488
|
+
isRetryable: true,
|
|
1489
|
+
transient: true,
|
|
1490
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1493
|
+
else {
|
|
1494
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1495
|
+
operation: 'findManySystemAlert',
|
|
1496
|
+
model: 'SystemAlert',
|
|
1497
|
+
error: String(error),
|
|
1498
|
+
isRetryable: false,
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1387
1501
|
throw error;
|
|
1388
1502
|
}
|
|
1389
1503
|
}
|