@adaptic/backend-legacy 0.0.960 → 0.0.961
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/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/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -148,13 +148,28 @@ exports.DecisionMemorySummary = {
|
|
|
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: 'createOneDecisionMemorySummary',
|
|
158
|
+
model: 'DecisionMemorySummary',
|
|
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: 'createOneDecisionMemorySummary',
|
|
168
|
+
model: 'DecisionMemorySummary',
|
|
169
|
+
error: String(error),
|
|
170
|
+
isRetryable: false,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
158
173
|
throw error;
|
|
159
174
|
}
|
|
160
175
|
}
|
|
@@ -284,13 +299,25 @@ exports.DecisionMemorySummary = {
|
|
|
284
299
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
285
300
|
continue;
|
|
286
301
|
}
|
|
287
|
-
// Log structured error details and rethrow
|
|
288
|
-
|
|
289
|
-
operation
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
302
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
303
|
+
if (isConnectionError) {
|
|
304
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
305
|
+
operation: 'createManyDecisionMemorySummary',
|
|
306
|
+
model: 'DecisionMemorySummary',
|
|
307
|
+
error: String(error),
|
|
308
|
+
isRetryable: true,
|
|
309
|
+
transient: true,
|
|
310
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
315
|
+
operation: 'createManyDecisionMemorySummary',
|
|
316
|
+
model: 'DecisionMemorySummary',
|
|
317
|
+
error: String(error),
|
|
318
|
+
isRetryable: false,
|
|
319
|
+
});
|
|
320
|
+
}
|
|
294
321
|
throw error;
|
|
295
322
|
}
|
|
296
323
|
}
|
|
@@ -453,14 +480,27 @@ exports.DecisionMemorySummary = {
|
|
|
453
480
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
454
481
|
continue;
|
|
455
482
|
}
|
|
456
|
-
// Log structured error details and rethrow
|
|
457
|
-
|
|
458
|
-
operation
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
483
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
484
|
+
if (isConnectionError) {
|
|
485
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
486
|
+
operation: 'updateOneDecisionMemorySummary',
|
|
487
|
+
model: 'DecisionMemorySummary',
|
|
488
|
+
error: String(error),
|
|
489
|
+
recordId: props.id,
|
|
490
|
+
isRetryable: true,
|
|
491
|
+
transient: true,
|
|
492
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
logger_1.logger.error("Database update operation failed", {
|
|
497
|
+
operation: 'updateOneDecisionMemorySummary',
|
|
498
|
+
model: 'DecisionMemorySummary',
|
|
499
|
+
error: String(error),
|
|
500
|
+
recordId: props.id,
|
|
501
|
+
isRetryable: false,
|
|
502
|
+
});
|
|
503
|
+
}
|
|
464
504
|
throw error;
|
|
465
505
|
}
|
|
466
506
|
}
|
|
@@ -640,14 +680,27 @@ exports.DecisionMemorySummary = {
|
|
|
640
680
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
641
681
|
continue;
|
|
642
682
|
}
|
|
643
|
-
// Log structured error details and rethrow
|
|
644
|
-
|
|
645
|
-
operation
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
683
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
684
|
+
if (isConnectionError) {
|
|
685
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
686
|
+
operation: 'upsertOneDecisionMemorySummary',
|
|
687
|
+
model: 'DecisionMemorySummary',
|
|
688
|
+
error: String(error),
|
|
689
|
+
recordId: props.id,
|
|
690
|
+
isRetryable: true,
|
|
691
|
+
transient: true,
|
|
692
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
else {
|
|
696
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
697
|
+
operation: 'upsertOneDecisionMemorySummary',
|
|
698
|
+
model: 'DecisionMemorySummary',
|
|
699
|
+
error: String(error),
|
|
700
|
+
recordId: props.id,
|
|
701
|
+
isRetryable: false,
|
|
702
|
+
});
|
|
703
|
+
}
|
|
651
704
|
throw error;
|
|
652
705
|
}
|
|
653
706
|
}
|
|
@@ -808,13 +861,25 @@ exports.DecisionMemorySummary = {
|
|
|
808
861
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
809
862
|
continue;
|
|
810
863
|
}
|
|
811
|
-
// Log structured error details and rethrow
|
|
812
|
-
|
|
813
|
-
operation
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
864
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
865
|
+
if (isConnectionError) {
|
|
866
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
867
|
+
operation: 'updateManyDecisionMemorySummary',
|
|
868
|
+
model: 'DecisionMemorySummary',
|
|
869
|
+
error: String(error),
|
|
870
|
+
isRetryable: true,
|
|
871
|
+
transient: true,
|
|
872
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
else {
|
|
876
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
877
|
+
operation: 'updateManyDecisionMemorySummary',
|
|
878
|
+
model: 'DecisionMemorySummary',
|
|
879
|
+
error: String(error),
|
|
880
|
+
isRetryable: false,
|
|
881
|
+
});
|
|
882
|
+
}
|
|
818
883
|
throw error;
|
|
819
884
|
}
|
|
820
885
|
}
|
|
@@ -937,14 +1002,27 @@ exports.DecisionMemorySummary = {
|
|
|
937
1002
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
938
1003
|
continue;
|
|
939
1004
|
}
|
|
940
|
-
// Log structured error details and rethrow
|
|
941
|
-
|
|
942
|
-
operation
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
1005
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1006
|
+
if (isConnectionError) {
|
|
1007
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1008
|
+
operation: 'deleteOneDecisionMemorySummary',
|
|
1009
|
+
model: 'DecisionMemorySummary',
|
|
1010
|
+
error: String(error),
|
|
1011
|
+
recordId: props.id,
|
|
1012
|
+
isRetryable: true,
|
|
1013
|
+
transient: true,
|
|
1014
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
else {
|
|
1018
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1019
|
+
operation: 'deleteOneDecisionMemorySummary',
|
|
1020
|
+
model: 'DecisionMemorySummary',
|
|
1021
|
+
error: String(error),
|
|
1022
|
+
recordId: props.id,
|
|
1023
|
+
isRetryable: false,
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
948
1026
|
throw error;
|
|
949
1027
|
}
|
|
950
1028
|
}
|
|
@@ -1052,13 +1130,25 @@ exports.DecisionMemorySummary = {
|
|
|
1052
1130
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1053
1131
|
continue;
|
|
1054
1132
|
}
|
|
1055
|
-
// Log structured error details and rethrow
|
|
1056
|
-
|
|
1057
|
-
operation
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1133
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1134
|
+
if (isConnectionError) {
|
|
1135
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1136
|
+
operation: 'getDecisionMemorySummary',
|
|
1137
|
+
model: 'DecisionMemorySummary',
|
|
1138
|
+
error: String(error),
|
|
1139
|
+
isRetryable: true,
|
|
1140
|
+
transient: true,
|
|
1141
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
else {
|
|
1145
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1146
|
+
operation: 'getDecisionMemorySummary',
|
|
1147
|
+
model: 'DecisionMemorySummary',
|
|
1148
|
+
error: String(error),
|
|
1149
|
+
isRetryable: false,
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1062
1152
|
throw error;
|
|
1063
1153
|
}
|
|
1064
1154
|
}
|
|
@@ -1145,13 +1235,25 @@ exports.DecisionMemorySummary = {
|
|
|
1145
1235
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1146
1236
|
continue;
|
|
1147
1237
|
}
|
|
1148
|
-
// Log structured error details and rethrow
|
|
1149
|
-
|
|
1150
|
-
operation
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1238
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1239
|
+
if (isConnectionError) {
|
|
1240
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1241
|
+
operation: 'getAllDecisionMemorySummary',
|
|
1242
|
+
model: 'DecisionMemorySummary',
|
|
1243
|
+
error: String(error),
|
|
1244
|
+
isRetryable: true,
|
|
1245
|
+
transient: true,
|
|
1246
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
else {
|
|
1250
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1251
|
+
operation: 'getAllDecisionMemorySummary',
|
|
1252
|
+
model: 'DecisionMemorySummary',
|
|
1253
|
+
error: String(error),
|
|
1254
|
+
isRetryable: false,
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1155
1257
|
throw error;
|
|
1156
1258
|
}
|
|
1157
1259
|
}
|
|
@@ -1271,13 +1373,25 @@ exports.DecisionMemorySummary = {
|
|
|
1271
1373
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1272
1374
|
continue;
|
|
1273
1375
|
}
|
|
1274
|
-
// Log structured error details and rethrow
|
|
1275
|
-
|
|
1276
|
-
operation
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1376
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1377
|
+
if (isConnectionError) {
|
|
1378
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1379
|
+
operation: 'findManyDecisionMemorySummary',
|
|
1380
|
+
model: 'DecisionMemorySummary',
|
|
1381
|
+
error: String(error),
|
|
1382
|
+
isRetryable: true,
|
|
1383
|
+
transient: true,
|
|
1384
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
else {
|
|
1388
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1389
|
+
operation: 'findManyDecisionMemorySummary',
|
|
1390
|
+
model: 'DecisionMemorySummary',
|
|
1391
|
+
error: String(error),
|
|
1392
|
+
isRetryable: false,
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1281
1395
|
throw error;
|
|
1282
1396
|
}
|
|
1283
1397
|
}
|
package/EconomicEvent.cjs
CHANGED
|
@@ -140,13 +140,28 @@ exports.EconomicEvent = {
|
|
|
140
140
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
141
141
|
continue;
|
|
142
142
|
}
|
|
143
|
-
// Log structured error details and rethrow
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
// Log structured error details and rethrow.
|
|
144
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
145
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
146
|
+
// from true defects.
|
|
147
|
+
if (isConnectionError) {
|
|
148
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
149
|
+
operation: 'createOneEconomicEvent',
|
|
150
|
+
model: 'EconomicEvent',
|
|
151
|
+
error: String(error),
|
|
152
|
+
isRetryable: true,
|
|
153
|
+
transient: true,
|
|
154
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
logger_1.logger.error("Database create operation failed", {
|
|
159
|
+
operation: 'createOneEconomicEvent',
|
|
160
|
+
model: 'EconomicEvent',
|
|
161
|
+
error: String(error),
|
|
162
|
+
isRetryable: false,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
150
165
|
throw error;
|
|
151
166
|
}
|
|
152
167
|
}
|
|
@@ -268,13 +283,25 @@ exports.EconomicEvent = {
|
|
|
268
283
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
269
284
|
continue;
|
|
270
285
|
}
|
|
271
|
-
// Log structured error details and rethrow
|
|
272
|
-
|
|
273
|
-
operation
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
286
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
287
|
+
if (isConnectionError) {
|
|
288
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
289
|
+
operation: 'createManyEconomicEvent',
|
|
290
|
+
model: 'EconomicEvent',
|
|
291
|
+
error: String(error),
|
|
292
|
+
isRetryable: true,
|
|
293
|
+
transient: true,
|
|
294
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
299
|
+
operation: 'createManyEconomicEvent',
|
|
300
|
+
model: 'EconomicEvent',
|
|
301
|
+
error: String(error),
|
|
302
|
+
isRetryable: false,
|
|
303
|
+
});
|
|
304
|
+
}
|
|
278
305
|
throw error;
|
|
279
306
|
}
|
|
280
307
|
}
|
|
@@ -417,14 +444,27 @@ exports.EconomicEvent = {
|
|
|
417
444
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
418
445
|
continue;
|
|
419
446
|
}
|
|
420
|
-
// Log structured error details and rethrow
|
|
421
|
-
|
|
422
|
-
operation
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
447
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
448
|
+
if (isConnectionError) {
|
|
449
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
450
|
+
operation: 'updateOneEconomicEvent',
|
|
451
|
+
model: 'EconomicEvent',
|
|
452
|
+
error: String(error),
|
|
453
|
+
recordId: props.id,
|
|
454
|
+
isRetryable: true,
|
|
455
|
+
transient: true,
|
|
456
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
logger_1.logger.error("Database update operation failed", {
|
|
461
|
+
operation: 'updateOneEconomicEvent',
|
|
462
|
+
model: 'EconomicEvent',
|
|
463
|
+
error: String(error),
|
|
464
|
+
recordId: props.id,
|
|
465
|
+
isRetryable: false,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
428
468
|
throw error;
|
|
429
469
|
}
|
|
430
470
|
}
|
|
@@ -567,14 +607,27 @@ exports.EconomicEvent = {
|
|
|
567
607
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
568
608
|
continue;
|
|
569
609
|
}
|
|
570
|
-
// Log structured error details and rethrow
|
|
571
|
-
|
|
572
|
-
operation
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
610
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
611
|
+
if (isConnectionError) {
|
|
612
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
613
|
+
operation: 'upsertOneEconomicEvent',
|
|
614
|
+
model: 'EconomicEvent',
|
|
615
|
+
error: String(error),
|
|
616
|
+
recordId: props.id,
|
|
617
|
+
isRetryable: true,
|
|
618
|
+
transient: true,
|
|
619
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
else {
|
|
623
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
624
|
+
operation: 'upsertOneEconomicEvent',
|
|
625
|
+
model: 'EconomicEvent',
|
|
626
|
+
error: String(error),
|
|
627
|
+
recordId: props.id,
|
|
628
|
+
isRetryable: false,
|
|
629
|
+
});
|
|
630
|
+
}
|
|
578
631
|
throw error;
|
|
579
632
|
}
|
|
580
633
|
}
|
|
@@ -715,13 +768,25 @@ exports.EconomicEvent = {
|
|
|
715
768
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
716
769
|
continue;
|
|
717
770
|
}
|
|
718
|
-
// Log structured error details and rethrow
|
|
719
|
-
|
|
720
|
-
operation
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
771
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
772
|
+
if (isConnectionError) {
|
|
773
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
774
|
+
operation: 'updateManyEconomicEvent',
|
|
775
|
+
model: 'EconomicEvent',
|
|
776
|
+
error: String(error),
|
|
777
|
+
isRetryable: true,
|
|
778
|
+
transient: true,
|
|
779
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
else {
|
|
783
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
784
|
+
operation: 'updateManyEconomicEvent',
|
|
785
|
+
model: 'EconomicEvent',
|
|
786
|
+
error: String(error),
|
|
787
|
+
isRetryable: false,
|
|
788
|
+
});
|
|
789
|
+
}
|
|
725
790
|
throw error;
|
|
726
791
|
}
|
|
727
792
|
}
|
|
@@ -844,14 +909,27 @@ exports.EconomicEvent = {
|
|
|
844
909
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
845
910
|
continue;
|
|
846
911
|
}
|
|
847
|
-
// Log structured error details and rethrow
|
|
848
|
-
|
|
849
|
-
operation
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
912
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
913
|
+
if (isConnectionError) {
|
|
914
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
915
|
+
operation: 'deleteOneEconomicEvent',
|
|
916
|
+
model: 'EconomicEvent',
|
|
917
|
+
error: String(error),
|
|
918
|
+
recordId: props.id,
|
|
919
|
+
isRetryable: true,
|
|
920
|
+
transient: true,
|
|
921
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
else {
|
|
925
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
926
|
+
operation: 'deleteOneEconomicEvent',
|
|
927
|
+
model: 'EconomicEvent',
|
|
928
|
+
error: String(error),
|
|
929
|
+
recordId: props.id,
|
|
930
|
+
isRetryable: false,
|
|
931
|
+
});
|
|
932
|
+
}
|
|
855
933
|
throw error;
|
|
856
934
|
}
|
|
857
935
|
}
|
|
@@ -950,13 +1028,25 @@ exports.EconomicEvent = {
|
|
|
950
1028
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
951
1029
|
continue;
|
|
952
1030
|
}
|
|
953
|
-
// Log structured error details and rethrow
|
|
954
|
-
|
|
955
|
-
operation
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1031
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1032
|
+
if (isConnectionError) {
|
|
1033
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1034
|
+
operation: 'getEconomicEvent',
|
|
1035
|
+
model: 'EconomicEvent',
|
|
1036
|
+
error: String(error),
|
|
1037
|
+
isRetryable: true,
|
|
1038
|
+
transient: true,
|
|
1039
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
else {
|
|
1043
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1044
|
+
operation: 'getEconomicEvent',
|
|
1045
|
+
model: 'EconomicEvent',
|
|
1046
|
+
error: String(error),
|
|
1047
|
+
isRetryable: false,
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
960
1050
|
throw error;
|
|
961
1051
|
}
|
|
962
1052
|
}
|
|
@@ -1043,13 +1133,25 @@ exports.EconomicEvent = {
|
|
|
1043
1133
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1044
1134
|
continue;
|
|
1045
1135
|
}
|
|
1046
|
-
// Log structured error details and rethrow
|
|
1047
|
-
|
|
1048
|
-
operation
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1136
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1137
|
+
if (isConnectionError) {
|
|
1138
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1139
|
+
operation: 'getAllEconomicEvent',
|
|
1140
|
+
model: 'EconomicEvent',
|
|
1141
|
+
error: String(error),
|
|
1142
|
+
isRetryable: true,
|
|
1143
|
+
transient: true,
|
|
1144
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
else {
|
|
1148
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1149
|
+
operation: 'getAllEconomicEvent',
|
|
1150
|
+
model: 'EconomicEvent',
|
|
1151
|
+
error: String(error),
|
|
1152
|
+
isRetryable: false,
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1053
1155
|
throw error;
|
|
1054
1156
|
}
|
|
1055
1157
|
}
|
|
@@ -1160,13 +1262,25 @@ exports.EconomicEvent = {
|
|
|
1160
1262
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1161
1263
|
continue;
|
|
1162
1264
|
}
|
|
1163
|
-
// Log structured error details and rethrow
|
|
1164
|
-
|
|
1165
|
-
operation
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1265
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1266
|
+
if (isConnectionError) {
|
|
1267
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1268
|
+
operation: 'findManyEconomicEvent',
|
|
1269
|
+
model: 'EconomicEvent',
|
|
1270
|
+
error: String(error),
|
|
1271
|
+
isRetryable: true,
|
|
1272
|
+
transient: true,
|
|
1273
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
else {
|
|
1277
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1278
|
+
operation: 'findManyEconomicEvent',
|
|
1279
|
+
model: 'EconomicEvent',
|
|
1280
|
+
error: String(error),
|
|
1281
|
+
isRetryable: false,
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1170
1284
|
throw error;
|
|
1171
1285
|
}
|
|
1172
1286
|
}
|