@adaptic/backend-legacy 0.0.959 → 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
package/esm/TradingPolicy.mjs
CHANGED
|
@@ -656,13 +656,28 @@ export const TradingPolicy = {
|
|
|
656
656
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
657
657
|
continue;
|
|
658
658
|
}
|
|
659
|
-
// Log structured error details and rethrow
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
659
|
+
// Log structured error details and rethrow.
|
|
660
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
661
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
662
|
+
// from true defects.
|
|
663
|
+
if (isConnectionError) {
|
|
664
|
+
logger.warn("Database create operation failed (transient after retries)", {
|
|
665
|
+
operation: 'createOneTradingPolicy',
|
|
666
|
+
model: 'TradingPolicy',
|
|
667
|
+
error: String(error),
|
|
668
|
+
isRetryable: true,
|
|
669
|
+
transient: true,
|
|
670
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
else {
|
|
674
|
+
logger.error("Database create operation failed", {
|
|
675
|
+
operation: 'createOneTradingPolicy',
|
|
676
|
+
model: 'TradingPolicy',
|
|
677
|
+
error: String(error),
|
|
678
|
+
isRetryable: false,
|
|
679
|
+
});
|
|
680
|
+
}
|
|
666
681
|
throw error;
|
|
667
682
|
}
|
|
668
683
|
}
|
|
@@ -843,13 +858,25 @@ export const TradingPolicy = {
|
|
|
843
858
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
844
859
|
continue;
|
|
845
860
|
}
|
|
846
|
-
// Log structured error details and rethrow
|
|
847
|
-
|
|
848
|
-
operation
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
861
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
862
|
+
if (isConnectionError) {
|
|
863
|
+
logger.warn("Database createMany operation failed (transient after retries)", {
|
|
864
|
+
operation: 'createManyTradingPolicy',
|
|
865
|
+
model: 'TradingPolicy',
|
|
866
|
+
error: String(error),
|
|
867
|
+
isRetryable: true,
|
|
868
|
+
transient: true,
|
|
869
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
else {
|
|
873
|
+
logger.error("Database createMany operation failed", {
|
|
874
|
+
operation: 'createManyTradingPolicy',
|
|
875
|
+
model: 'TradingPolicy',
|
|
876
|
+
error: String(error),
|
|
877
|
+
isRetryable: false,
|
|
878
|
+
});
|
|
879
|
+
}
|
|
853
880
|
throw error;
|
|
854
881
|
}
|
|
855
882
|
}
|
|
@@ -2560,14 +2587,27 @@ export const TradingPolicy = {
|
|
|
2560
2587
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2561
2588
|
continue;
|
|
2562
2589
|
}
|
|
2563
|
-
// Log structured error details and rethrow
|
|
2564
|
-
|
|
2565
|
-
operation
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2590
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2591
|
+
if (isConnectionError) {
|
|
2592
|
+
logger.warn("Database update operation failed (transient after retries)", {
|
|
2593
|
+
operation: 'updateOneTradingPolicy',
|
|
2594
|
+
model: 'TradingPolicy',
|
|
2595
|
+
error: String(error),
|
|
2596
|
+
recordId: props.id,
|
|
2597
|
+
isRetryable: true,
|
|
2598
|
+
transient: true,
|
|
2599
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2600
|
+
});
|
|
2601
|
+
}
|
|
2602
|
+
else {
|
|
2603
|
+
logger.error("Database update operation failed", {
|
|
2604
|
+
operation: 'updateOneTradingPolicy',
|
|
2605
|
+
model: 'TradingPolicy',
|
|
2606
|
+
error: String(error),
|
|
2607
|
+
recordId: props.id,
|
|
2608
|
+
isRetryable: false,
|
|
2609
|
+
});
|
|
2610
|
+
}
|
|
2571
2611
|
throw error;
|
|
2572
2612
|
}
|
|
2573
2613
|
}
|
|
@@ -4745,14 +4785,27 @@ export const TradingPolicy = {
|
|
|
4745
4785
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4746
4786
|
continue;
|
|
4747
4787
|
}
|
|
4748
|
-
// Log structured error details and rethrow
|
|
4749
|
-
|
|
4750
|
-
operation
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4788
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4789
|
+
if (isConnectionError) {
|
|
4790
|
+
logger.warn("Database upsert operation failed (transient after retries)", {
|
|
4791
|
+
operation: 'upsertOneTradingPolicy',
|
|
4792
|
+
model: 'TradingPolicy',
|
|
4793
|
+
error: String(error),
|
|
4794
|
+
recordId: props.id,
|
|
4795
|
+
isRetryable: true,
|
|
4796
|
+
transient: true,
|
|
4797
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4798
|
+
});
|
|
4799
|
+
}
|
|
4800
|
+
else {
|
|
4801
|
+
logger.error("Database upsert operation failed", {
|
|
4802
|
+
operation: 'upsertOneTradingPolicy',
|
|
4803
|
+
model: 'TradingPolicy',
|
|
4804
|
+
error: String(error),
|
|
4805
|
+
recordId: props.id,
|
|
4806
|
+
isRetryable: false,
|
|
4807
|
+
});
|
|
4808
|
+
}
|
|
4756
4809
|
throw error;
|
|
4757
4810
|
}
|
|
4758
4811
|
}
|
|
@@ -6461,13 +6514,25 @@ export const TradingPolicy = {
|
|
|
6461
6514
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6462
6515
|
continue;
|
|
6463
6516
|
}
|
|
6464
|
-
// Log structured error details and rethrow
|
|
6465
|
-
|
|
6466
|
-
operation
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6517
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6518
|
+
if (isConnectionError) {
|
|
6519
|
+
logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
6520
|
+
operation: 'updateManyTradingPolicy',
|
|
6521
|
+
model: 'TradingPolicy',
|
|
6522
|
+
error: String(error),
|
|
6523
|
+
isRetryable: true,
|
|
6524
|
+
transient: true,
|
|
6525
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6526
|
+
});
|
|
6527
|
+
}
|
|
6528
|
+
else {
|
|
6529
|
+
logger.error("Database updateMany operation failed", {
|
|
6530
|
+
operation: 'updateManyTradingPolicy',
|
|
6531
|
+
model: 'TradingPolicy',
|
|
6532
|
+
error: String(error),
|
|
6533
|
+
isRetryable: false,
|
|
6534
|
+
});
|
|
6535
|
+
}
|
|
6471
6536
|
throw error;
|
|
6472
6537
|
}
|
|
6473
6538
|
}
|
|
@@ -6589,14 +6654,27 @@ export const TradingPolicy = {
|
|
|
6589
6654
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6590
6655
|
continue;
|
|
6591
6656
|
}
|
|
6592
|
-
// Log structured error details and rethrow
|
|
6593
|
-
|
|
6594
|
-
operation
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6657
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6658
|
+
if (isConnectionError) {
|
|
6659
|
+
logger.warn("Database delete operation failed (transient after retries)", {
|
|
6660
|
+
operation: 'deleteOneTradingPolicy',
|
|
6661
|
+
model: 'TradingPolicy',
|
|
6662
|
+
error: String(error),
|
|
6663
|
+
recordId: props.id,
|
|
6664
|
+
isRetryable: true,
|
|
6665
|
+
transient: true,
|
|
6666
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6667
|
+
});
|
|
6668
|
+
}
|
|
6669
|
+
else {
|
|
6670
|
+
logger.error("Database delete operation failed", {
|
|
6671
|
+
operation: 'deleteOneTradingPolicy',
|
|
6672
|
+
model: 'TradingPolicy',
|
|
6673
|
+
error: String(error),
|
|
6674
|
+
recordId: props.id,
|
|
6675
|
+
isRetryable: false,
|
|
6676
|
+
});
|
|
6677
|
+
}
|
|
6600
6678
|
throw error;
|
|
6601
6679
|
}
|
|
6602
6680
|
}
|
|
@@ -6701,13 +6779,25 @@ export const TradingPolicy = {
|
|
|
6701
6779
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6702
6780
|
continue;
|
|
6703
6781
|
}
|
|
6704
|
-
// Log structured error details and rethrow
|
|
6705
|
-
|
|
6706
|
-
operation
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6782
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6783
|
+
if (isConnectionError) {
|
|
6784
|
+
logger.warn("Database get operation failed (transient after retries)", {
|
|
6785
|
+
operation: 'getTradingPolicy',
|
|
6786
|
+
model: 'TradingPolicy',
|
|
6787
|
+
error: String(error),
|
|
6788
|
+
isRetryable: true,
|
|
6789
|
+
transient: true,
|
|
6790
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6791
|
+
});
|
|
6792
|
+
}
|
|
6793
|
+
else {
|
|
6794
|
+
logger.error("Database get operation failed", {
|
|
6795
|
+
operation: 'getTradingPolicy',
|
|
6796
|
+
model: 'TradingPolicy',
|
|
6797
|
+
error: String(error),
|
|
6798
|
+
isRetryable: false,
|
|
6799
|
+
});
|
|
6800
|
+
}
|
|
6711
6801
|
throw error;
|
|
6712
6802
|
}
|
|
6713
6803
|
}
|
|
@@ -6793,13 +6883,25 @@ export const TradingPolicy = {
|
|
|
6793
6883
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6794
6884
|
continue;
|
|
6795
6885
|
}
|
|
6796
|
-
// Log structured error details and rethrow
|
|
6797
|
-
|
|
6798
|
-
operation
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6886
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6887
|
+
if (isConnectionError) {
|
|
6888
|
+
logger.warn("Database getAll operation failed (transient after retries)", {
|
|
6889
|
+
operation: 'getAllTradingPolicy',
|
|
6890
|
+
model: 'TradingPolicy',
|
|
6891
|
+
error: String(error),
|
|
6892
|
+
isRetryable: true,
|
|
6893
|
+
transient: true,
|
|
6894
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6895
|
+
});
|
|
6896
|
+
}
|
|
6897
|
+
else {
|
|
6898
|
+
logger.error("Database getAll operation failed", {
|
|
6899
|
+
operation: 'getAllTradingPolicy',
|
|
6900
|
+
model: 'TradingPolicy',
|
|
6901
|
+
error: String(error),
|
|
6902
|
+
isRetryable: false,
|
|
6903
|
+
});
|
|
6904
|
+
}
|
|
6803
6905
|
throw error;
|
|
6804
6906
|
}
|
|
6805
6907
|
}
|
|
@@ -6918,13 +7020,25 @@ export const TradingPolicy = {
|
|
|
6918
7020
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6919
7021
|
continue;
|
|
6920
7022
|
}
|
|
6921
|
-
// Log structured error details and rethrow
|
|
6922
|
-
|
|
6923
|
-
operation
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
7023
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7024
|
+
if (isConnectionError) {
|
|
7025
|
+
logger.warn("Database findMany operation failed (transient after retries)", {
|
|
7026
|
+
operation: 'findManyTradingPolicy',
|
|
7027
|
+
model: 'TradingPolicy',
|
|
7028
|
+
error: String(error),
|
|
7029
|
+
isRetryable: true,
|
|
7030
|
+
transient: true,
|
|
7031
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7032
|
+
});
|
|
7033
|
+
}
|
|
7034
|
+
else {
|
|
7035
|
+
logger.error("Database findMany operation failed", {
|
|
7036
|
+
operation: 'findManyTradingPolicy',
|
|
7037
|
+
model: 'TradingPolicy',
|
|
7038
|
+
error: String(error),
|
|
7039
|
+
isRetryable: false,
|
|
7040
|
+
});
|
|
7041
|
+
}
|
|
6928
7042
|
throw error;
|
|
6929
7043
|
}
|
|
6930
7044
|
}
|
package/esm/User.d.ts.map
CHANGED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