@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/PolicyOverlay.cjs
CHANGED
|
@@ -383,13 +383,28 @@ exports.PolicyOverlay = {
|
|
|
383
383
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
384
384
|
continue;
|
|
385
385
|
}
|
|
386
|
-
// Log structured error details and rethrow
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
386
|
+
// Log structured error details and rethrow.
|
|
387
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
388
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
389
|
+
// from true defects.
|
|
390
|
+
if (isConnectionError) {
|
|
391
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
392
|
+
operation: 'createOnePolicyOverlay',
|
|
393
|
+
model: 'PolicyOverlay',
|
|
394
|
+
error: String(error),
|
|
395
|
+
isRetryable: true,
|
|
396
|
+
transient: true,
|
|
397
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
401
|
+
logger_1.logger.error("Database create operation failed", {
|
|
402
|
+
operation: 'createOnePolicyOverlay',
|
|
403
|
+
model: 'PolicyOverlay',
|
|
404
|
+
error: String(error),
|
|
405
|
+
isRetryable: false,
|
|
406
|
+
});
|
|
407
|
+
}
|
|
393
408
|
throw error;
|
|
394
409
|
}
|
|
395
410
|
}
|
|
@@ -521,13 +536,25 @@ exports.PolicyOverlay = {
|
|
|
521
536
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
522
537
|
continue;
|
|
523
538
|
}
|
|
524
|
-
// Log structured error details and rethrow
|
|
525
|
-
|
|
526
|
-
operation
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
539
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
540
|
+
if (isConnectionError) {
|
|
541
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
542
|
+
operation: 'createManyPolicyOverlay',
|
|
543
|
+
model: 'PolicyOverlay',
|
|
544
|
+
error: String(error),
|
|
545
|
+
isRetryable: true,
|
|
546
|
+
transient: true,
|
|
547
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
else {
|
|
551
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
552
|
+
operation: 'createManyPolicyOverlay',
|
|
553
|
+
model: 'PolicyOverlay',
|
|
554
|
+
error: String(error),
|
|
555
|
+
isRetryable: false,
|
|
556
|
+
});
|
|
557
|
+
}
|
|
531
558
|
throw error;
|
|
532
559
|
}
|
|
533
560
|
}
|
|
@@ -1521,14 +1548,27 @@ exports.PolicyOverlay = {
|
|
|
1521
1548
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1522
1549
|
continue;
|
|
1523
1550
|
}
|
|
1524
|
-
// Log structured error details and rethrow
|
|
1525
|
-
|
|
1526
|
-
operation
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1551
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1552
|
+
if (isConnectionError) {
|
|
1553
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
1554
|
+
operation: 'updateOnePolicyOverlay',
|
|
1555
|
+
model: 'PolicyOverlay',
|
|
1556
|
+
error: String(error),
|
|
1557
|
+
recordId: props.id,
|
|
1558
|
+
isRetryable: true,
|
|
1559
|
+
transient: true,
|
|
1560
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1561
|
+
});
|
|
1562
|
+
}
|
|
1563
|
+
else {
|
|
1564
|
+
logger_1.logger.error("Database update operation failed", {
|
|
1565
|
+
operation: 'updateOnePolicyOverlay',
|
|
1566
|
+
model: 'PolicyOverlay',
|
|
1567
|
+
error: String(error),
|
|
1568
|
+
recordId: props.id,
|
|
1569
|
+
isRetryable: false,
|
|
1570
|
+
});
|
|
1571
|
+
}
|
|
1532
1572
|
throw error;
|
|
1533
1573
|
}
|
|
1534
1574
|
}
|
|
@@ -2764,14 +2804,27 @@ exports.PolicyOverlay = {
|
|
|
2764
2804
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2765
2805
|
continue;
|
|
2766
2806
|
}
|
|
2767
|
-
// Log structured error details and rethrow
|
|
2768
|
-
|
|
2769
|
-
operation
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2807
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2808
|
+
if (isConnectionError) {
|
|
2809
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
2810
|
+
operation: 'upsertOnePolicyOverlay',
|
|
2811
|
+
model: 'PolicyOverlay',
|
|
2812
|
+
error: String(error),
|
|
2813
|
+
recordId: props.id,
|
|
2814
|
+
isRetryable: true,
|
|
2815
|
+
transient: true,
|
|
2816
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2817
|
+
});
|
|
2818
|
+
}
|
|
2819
|
+
else {
|
|
2820
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
2821
|
+
operation: 'upsertOnePolicyOverlay',
|
|
2822
|
+
model: 'PolicyOverlay',
|
|
2823
|
+
error: String(error),
|
|
2824
|
+
recordId: props.id,
|
|
2825
|
+
isRetryable: false,
|
|
2826
|
+
});
|
|
2827
|
+
}
|
|
2775
2828
|
throw error;
|
|
2776
2829
|
}
|
|
2777
2830
|
}
|
|
@@ -3763,13 +3816,25 @@ exports.PolicyOverlay = {
|
|
|
3763
3816
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
3764
3817
|
continue;
|
|
3765
3818
|
}
|
|
3766
|
-
// Log structured error details and rethrow
|
|
3767
|
-
|
|
3768
|
-
operation
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3819
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
3820
|
+
if (isConnectionError) {
|
|
3821
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
3822
|
+
operation: 'updateManyPolicyOverlay',
|
|
3823
|
+
model: 'PolicyOverlay',
|
|
3824
|
+
error: String(error),
|
|
3825
|
+
isRetryable: true,
|
|
3826
|
+
transient: true,
|
|
3827
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
3828
|
+
});
|
|
3829
|
+
}
|
|
3830
|
+
else {
|
|
3831
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
3832
|
+
operation: 'updateManyPolicyOverlay',
|
|
3833
|
+
model: 'PolicyOverlay',
|
|
3834
|
+
error: String(error),
|
|
3835
|
+
isRetryable: false,
|
|
3836
|
+
});
|
|
3837
|
+
}
|
|
3773
3838
|
throw error;
|
|
3774
3839
|
}
|
|
3775
3840
|
}
|
|
@@ -3892,14 +3957,27 @@ exports.PolicyOverlay = {
|
|
|
3892
3957
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
3893
3958
|
continue;
|
|
3894
3959
|
}
|
|
3895
|
-
// Log structured error details and rethrow
|
|
3896
|
-
|
|
3897
|
-
operation
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3960
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
3961
|
+
if (isConnectionError) {
|
|
3962
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
3963
|
+
operation: 'deleteOnePolicyOverlay',
|
|
3964
|
+
model: 'PolicyOverlay',
|
|
3965
|
+
error: String(error),
|
|
3966
|
+
recordId: props.id,
|
|
3967
|
+
isRetryable: true,
|
|
3968
|
+
transient: true,
|
|
3969
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
3970
|
+
});
|
|
3971
|
+
}
|
|
3972
|
+
else {
|
|
3973
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
3974
|
+
operation: 'deleteOnePolicyOverlay',
|
|
3975
|
+
model: 'PolicyOverlay',
|
|
3976
|
+
error: String(error),
|
|
3977
|
+
recordId: props.id,
|
|
3978
|
+
isRetryable: false,
|
|
3979
|
+
});
|
|
3980
|
+
}
|
|
3903
3981
|
throw error;
|
|
3904
3982
|
}
|
|
3905
3983
|
}
|
|
@@ -4007,13 +4085,25 @@ exports.PolicyOverlay = {
|
|
|
4007
4085
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4008
4086
|
continue;
|
|
4009
4087
|
}
|
|
4010
|
-
// Log structured error details and rethrow
|
|
4011
|
-
|
|
4012
|
-
operation
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4088
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4089
|
+
if (isConnectionError) {
|
|
4090
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
4091
|
+
operation: 'getPolicyOverlay',
|
|
4092
|
+
model: 'PolicyOverlay',
|
|
4093
|
+
error: String(error),
|
|
4094
|
+
isRetryable: true,
|
|
4095
|
+
transient: true,
|
|
4096
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4097
|
+
});
|
|
4098
|
+
}
|
|
4099
|
+
else {
|
|
4100
|
+
logger_1.logger.error("Database get operation failed", {
|
|
4101
|
+
operation: 'getPolicyOverlay',
|
|
4102
|
+
model: 'PolicyOverlay',
|
|
4103
|
+
error: String(error),
|
|
4104
|
+
isRetryable: false,
|
|
4105
|
+
});
|
|
4106
|
+
}
|
|
4017
4107
|
throw error;
|
|
4018
4108
|
}
|
|
4019
4109
|
}
|
|
@@ -4100,13 +4190,25 @@ exports.PolicyOverlay = {
|
|
|
4100
4190
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4101
4191
|
continue;
|
|
4102
4192
|
}
|
|
4103
|
-
// Log structured error details and rethrow
|
|
4104
|
-
|
|
4105
|
-
operation
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4193
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4194
|
+
if (isConnectionError) {
|
|
4195
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
4196
|
+
operation: 'getAllPolicyOverlay',
|
|
4197
|
+
model: 'PolicyOverlay',
|
|
4198
|
+
error: String(error),
|
|
4199
|
+
isRetryable: true,
|
|
4200
|
+
transient: true,
|
|
4201
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4202
|
+
});
|
|
4203
|
+
}
|
|
4204
|
+
else {
|
|
4205
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
4206
|
+
operation: 'getAllPolicyOverlay',
|
|
4207
|
+
model: 'PolicyOverlay',
|
|
4208
|
+
error: String(error),
|
|
4209
|
+
isRetryable: false,
|
|
4210
|
+
});
|
|
4211
|
+
}
|
|
4110
4212
|
throw error;
|
|
4111
4213
|
}
|
|
4112
4214
|
}
|
|
@@ -4226,13 +4328,25 @@ exports.PolicyOverlay = {
|
|
|
4226
4328
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4227
4329
|
continue;
|
|
4228
4330
|
}
|
|
4229
|
-
// Log structured error details and rethrow
|
|
4230
|
-
|
|
4231
|
-
operation
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4331
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4332
|
+
if (isConnectionError) {
|
|
4333
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
4334
|
+
operation: 'findManyPolicyOverlay',
|
|
4335
|
+
model: 'PolicyOverlay',
|
|
4336
|
+
error: String(error),
|
|
4337
|
+
isRetryable: true,
|
|
4338
|
+
transient: true,
|
|
4339
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4340
|
+
});
|
|
4341
|
+
}
|
|
4342
|
+
else {
|
|
4343
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
4344
|
+
operation: 'findManyPolicyOverlay',
|
|
4345
|
+
model: 'PolicyOverlay',
|
|
4346
|
+
error: String(error),
|
|
4347
|
+
isRetryable: false,
|
|
4348
|
+
});
|
|
4349
|
+
}
|
|
4236
4350
|
throw error;
|
|
4237
4351
|
}
|
|
4238
4352
|
}
|
|
@@ -163,13 +163,28 @@ exports.PortfolioGreeksHistory = {
|
|
|
163
163
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
164
164
|
continue;
|
|
165
165
|
}
|
|
166
|
-
// Log structured error details and rethrow
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
166
|
+
// Log structured error details and rethrow.
|
|
167
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
168
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
169
|
+
// from true defects.
|
|
170
|
+
if (isConnectionError) {
|
|
171
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
172
|
+
operation: 'createOnePortfolioGreeksHistory',
|
|
173
|
+
model: 'PortfolioGreeksHistory',
|
|
174
|
+
error: String(error),
|
|
175
|
+
isRetryable: true,
|
|
176
|
+
transient: true,
|
|
177
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
logger_1.logger.error("Database create operation failed", {
|
|
182
|
+
operation: 'createOnePortfolioGreeksHistory',
|
|
183
|
+
model: 'PortfolioGreeksHistory',
|
|
184
|
+
error: String(error),
|
|
185
|
+
isRetryable: false,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
173
188
|
throw error;
|
|
174
189
|
}
|
|
175
190
|
}
|
|
@@ -309,13 +324,25 @@ exports.PortfolioGreeksHistory = {
|
|
|
309
324
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
310
325
|
continue;
|
|
311
326
|
}
|
|
312
|
-
// Log structured error details and rethrow
|
|
313
|
-
|
|
314
|
-
operation
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
327
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
328
|
+
if (isConnectionError) {
|
|
329
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
330
|
+
operation: 'createManyPortfolioGreeksHistory',
|
|
331
|
+
model: 'PortfolioGreeksHistory',
|
|
332
|
+
error: String(error),
|
|
333
|
+
isRetryable: true,
|
|
334
|
+
transient: true,
|
|
335
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
340
|
+
operation: 'createManyPortfolioGreeksHistory',
|
|
341
|
+
model: 'PortfolioGreeksHistory',
|
|
342
|
+
error: String(error),
|
|
343
|
+
isRetryable: false,
|
|
344
|
+
});
|
|
345
|
+
}
|
|
319
346
|
throw error;
|
|
320
347
|
}
|
|
321
348
|
}
|
|
@@ -505,14 +532,27 @@ exports.PortfolioGreeksHistory = {
|
|
|
505
532
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
506
533
|
continue;
|
|
507
534
|
}
|
|
508
|
-
// Log structured error details and rethrow
|
|
509
|
-
|
|
510
|
-
operation
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
535
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
536
|
+
if (isConnectionError) {
|
|
537
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
538
|
+
operation: 'updateOnePortfolioGreeksHistory',
|
|
539
|
+
model: 'PortfolioGreeksHistory',
|
|
540
|
+
error: String(error),
|
|
541
|
+
recordId: props.id,
|
|
542
|
+
isRetryable: true,
|
|
543
|
+
transient: true,
|
|
544
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
else {
|
|
548
|
+
logger_1.logger.error("Database update operation failed", {
|
|
549
|
+
operation: 'updateOnePortfolioGreeksHistory',
|
|
550
|
+
model: 'PortfolioGreeksHistory',
|
|
551
|
+
error: String(error),
|
|
552
|
+
recordId: props.id,
|
|
553
|
+
isRetryable: false,
|
|
554
|
+
});
|
|
555
|
+
}
|
|
516
556
|
throw error;
|
|
517
557
|
}
|
|
518
558
|
}
|
|
@@ -726,14 +766,27 @@ exports.PortfolioGreeksHistory = {
|
|
|
726
766
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
727
767
|
continue;
|
|
728
768
|
}
|
|
729
|
-
// Log structured error details and rethrow
|
|
730
|
-
|
|
731
|
-
operation
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
769
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
770
|
+
if (isConnectionError) {
|
|
771
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
772
|
+
operation: 'upsertOnePortfolioGreeksHistory',
|
|
773
|
+
model: 'PortfolioGreeksHistory',
|
|
774
|
+
error: String(error),
|
|
775
|
+
recordId: props.id,
|
|
776
|
+
isRetryable: true,
|
|
777
|
+
transient: true,
|
|
778
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
else {
|
|
782
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
783
|
+
operation: 'upsertOnePortfolioGreeksHistory',
|
|
784
|
+
model: 'PortfolioGreeksHistory',
|
|
785
|
+
error: String(error),
|
|
786
|
+
recordId: props.id,
|
|
787
|
+
isRetryable: false,
|
|
788
|
+
});
|
|
789
|
+
}
|
|
737
790
|
throw error;
|
|
738
791
|
}
|
|
739
792
|
}
|
|
@@ -921,13 +974,25 @@ exports.PortfolioGreeksHistory = {
|
|
|
921
974
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
922
975
|
continue;
|
|
923
976
|
}
|
|
924
|
-
// Log structured error details and rethrow
|
|
925
|
-
|
|
926
|
-
operation
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
977
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
978
|
+
if (isConnectionError) {
|
|
979
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
980
|
+
operation: 'updateManyPortfolioGreeksHistory',
|
|
981
|
+
model: 'PortfolioGreeksHistory',
|
|
982
|
+
error: String(error),
|
|
983
|
+
isRetryable: true,
|
|
984
|
+
transient: true,
|
|
985
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
989
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
990
|
+
operation: 'updateManyPortfolioGreeksHistory',
|
|
991
|
+
model: 'PortfolioGreeksHistory',
|
|
992
|
+
error: String(error),
|
|
993
|
+
isRetryable: false,
|
|
994
|
+
});
|
|
995
|
+
}
|
|
931
996
|
throw error;
|
|
932
997
|
}
|
|
933
998
|
}
|
|
@@ -1050,14 +1115,27 @@ exports.PortfolioGreeksHistory = {
|
|
|
1050
1115
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1051
1116
|
continue;
|
|
1052
1117
|
}
|
|
1053
|
-
// Log structured error details and rethrow
|
|
1054
|
-
|
|
1055
|
-
operation
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1118
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1119
|
+
if (isConnectionError) {
|
|
1120
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1121
|
+
operation: 'deleteOnePortfolioGreeksHistory',
|
|
1122
|
+
model: 'PortfolioGreeksHistory',
|
|
1123
|
+
error: String(error),
|
|
1124
|
+
recordId: props.id,
|
|
1125
|
+
isRetryable: true,
|
|
1126
|
+
transient: true,
|
|
1127
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
else {
|
|
1131
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1132
|
+
operation: 'deleteOnePortfolioGreeksHistory',
|
|
1133
|
+
model: 'PortfolioGreeksHistory',
|
|
1134
|
+
error: String(error),
|
|
1135
|
+
recordId: props.id,
|
|
1136
|
+
isRetryable: false,
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1061
1139
|
throw error;
|
|
1062
1140
|
}
|
|
1063
1141
|
}
|
|
@@ -1159,13 +1237,25 @@ exports.PortfolioGreeksHistory = {
|
|
|
1159
1237
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1160
1238
|
continue;
|
|
1161
1239
|
}
|
|
1162
|
-
// Log structured error details and rethrow
|
|
1163
|
-
|
|
1164
|
-
operation
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1240
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1241
|
+
if (isConnectionError) {
|
|
1242
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1243
|
+
operation: 'getPortfolioGreeksHistory',
|
|
1244
|
+
model: 'PortfolioGreeksHistory',
|
|
1245
|
+
error: String(error),
|
|
1246
|
+
isRetryable: true,
|
|
1247
|
+
transient: true,
|
|
1248
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1249
|
+
});
|
|
1250
|
+
}
|
|
1251
|
+
else {
|
|
1252
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1253
|
+
operation: 'getPortfolioGreeksHistory',
|
|
1254
|
+
model: 'PortfolioGreeksHistory',
|
|
1255
|
+
error: String(error),
|
|
1256
|
+
isRetryable: false,
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1169
1259
|
throw error;
|
|
1170
1260
|
}
|
|
1171
1261
|
}
|
|
@@ -1252,13 +1342,25 @@ exports.PortfolioGreeksHistory = {
|
|
|
1252
1342
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1253
1343
|
continue;
|
|
1254
1344
|
}
|
|
1255
|
-
// Log structured error details and rethrow
|
|
1256
|
-
|
|
1257
|
-
operation
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1345
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1346
|
+
if (isConnectionError) {
|
|
1347
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1348
|
+
operation: 'getAllPortfolioGreeksHistory',
|
|
1349
|
+
model: 'PortfolioGreeksHistory',
|
|
1350
|
+
error: String(error),
|
|
1351
|
+
isRetryable: true,
|
|
1352
|
+
transient: true,
|
|
1353
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
else {
|
|
1357
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1358
|
+
operation: 'getAllPortfolioGreeksHistory',
|
|
1359
|
+
model: 'PortfolioGreeksHistory',
|
|
1360
|
+
error: String(error),
|
|
1361
|
+
isRetryable: false,
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1262
1364
|
throw error;
|
|
1263
1365
|
}
|
|
1264
1366
|
}
|
|
@@ -1372,13 +1474,25 @@ exports.PortfolioGreeksHistory = {
|
|
|
1372
1474
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1373
1475
|
continue;
|
|
1374
1476
|
}
|
|
1375
|
-
// Log structured error details and rethrow
|
|
1376
|
-
|
|
1377
|
-
operation
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1477
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1478
|
+
if (isConnectionError) {
|
|
1479
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1480
|
+
operation: 'findManyPortfolioGreeksHistory',
|
|
1481
|
+
model: 'PortfolioGreeksHistory',
|
|
1482
|
+
error: String(error),
|
|
1483
|
+
isRetryable: true,
|
|
1484
|
+
transient: true,
|
|
1485
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1486
|
+
});
|
|
1487
|
+
}
|
|
1488
|
+
else {
|
|
1489
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1490
|
+
operation: 'findManyPortfolioGreeksHistory',
|
|
1491
|
+
model: 'PortfolioGreeksHistory',
|
|
1492
|
+
error: String(error),
|
|
1493
|
+
isRetryable: false,
|
|
1494
|
+
});
|
|
1495
|
+
}
|
|
1382
1496
|
throw error;
|
|
1383
1497
|
}
|
|
1384
1498
|
}
|