@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/Allocation.cjs
CHANGED
|
@@ -624,13 +624,28 @@ exports.Allocation = {
|
|
|
624
624
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
625
625
|
continue;
|
|
626
626
|
}
|
|
627
|
-
// Log structured error details and rethrow
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
627
|
+
// Log structured error details and rethrow.
|
|
628
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
629
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
630
|
+
// from true defects.
|
|
631
|
+
if (isConnectionError) {
|
|
632
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
633
|
+
operation: 'createOneAllocation',
|
|
634
|
+
model: 'Allocation',
|
|
635
|
+
error: String(error),
|
|
636
|
+
isRetryable: true,
|
|
637
|
+
transient: true,
|
|
638
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
else {
|
|
642
|
+
logger_1.logger.error("Database create operation failed", {
|
|
643
|
+
operation: 'createOneAllocation',
|
|
644
|
+
model: 'Allocation',
|
|
645
|
+
error: String(error),
|
|
646
|
+
isRetryable: false,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
634
649
|
throw error;
|
|
635
650
|
}
|
|
636
651
|
}
|
|
@@ -757,13 +772,25 @@ exports.Allocation = {
|
|
|
757
772
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
758
773
|
continue;
|
|
759
774
|
}
|
|
760
|
-
// Log structured error details and rethrow
|
|
761
|
-
|
|
762
|
-
operation
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
775
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
776
|
+
if (isConnectionError) {
|
|
777
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
778
|
+
operation: 'createManyAllocation',
|
|
779
|
+
model: 'Allocation',
|
|
780
|
+
error: String(error),
|
|
781
|
+
isRetryable: true,
|
|
782
|
+
transient: true,
|
|
783
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
else {
|
|
787
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
788
|
+
operation: 'createManyAllocation',
|
|
789
|
+
model: 'Allocation',
|
|
790
|
+
error: String(error),
|
|
791
|
+
isRetryable: false,
|
|
792
|
+
});
|
|
793
|
+
}
|
|
767
794
|
throw error;
|
|
768
795
|
}
|
|
769
796
|
}
|
|
@@ -2690,14 +2717,27 @@ exports.Allocation = {
|
|
|
2690
2717
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2691
2718
|
continue;
|
|
2692
2719
|
}
|
|
2693
|
-
// Log structured error details and rethrow
|
|
2694
|
-
|
|
2695
|
-
operation
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2720
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2721
|
+
if (isConnectionError) {
|
|
2722
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
2723
|
+
operation: 'updateOneAllocation',
|
|
2724
|
+
model: 'Allocation',
|
|
2725
|
+
error: String(error),
|
|
2726
|
+
recordId: props.id,
|
|
2727
|
+
isRetryable: true,
|
|
2728
|
+
transient: true,
|
|
2729
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2730
|
+
});
|
|
2731
|
+
}
|
|
2732
|
+
else {
|
|
2733
|
+
logger_1.logger.error("Database update operation failed", {
|
|
2734
|
+
operation: 'updateOneAllocation',
|
|
2735
|
+
model: 'Allocation',
|
|
2736
|
+
error: String(error),
|
|
2737
|
+
recordId: props.id,
|
|
2738
|
+
isRetryable: false,
|
|
2739
|
+
});
|
|
2740
|
+
}
|
|
2701
2741
|
throw error;
|
|
2702
2742
|
}
|
|
2703
2743
|
}
|
|
@@ -5082,14 +5122,27 @@ exports.Allocation = {
|
|
|
5082
5122
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
5083
5123
|
continue;
|
|
5084
5124
|
}
|
|
5085
|
-
// Log structured error details and rethrow
|
|
5086
|
-
|
|
5087
|
-
operation
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5125
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
5126
|
+
if (isConnectionError) {
|
|
5127
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
5128
|
+
operation: 'upsertOneAllocation',
|
|
5129
|
+
model: 'Allocation',
|
|
5130
|
+
error: String(error),
|
|
5131
|
+
recordId: props.id,
|
|
5132
|
+
isRetryable: true,
|
|
5133
|
+
transient: true,
|
|
5134
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
5135
|
+
});
|
|
5136
|
+
}
|
|
5137
|
+
else {
|
|
5138
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
5139
|
+
operation: 'upsertOneAllocation',
|
|
5140
|
+
model: 'Allocation',
|
|
5141
|
+
error: String(error),
|
|
5142
|
+
recordId: props.id,
|
|
5143
|
+
isRetryable: false,
|
|
5144
|
+
});
|
|
5145
|
+
}
|
|
5093
5146
|
throw error;
|
|
5094
5147
|
}
|
|
5095
5148
|
}
|
|
@@ -7005,13 +7058,25 @@ exports.Allocation = {
|
|
|
7005
7058
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7006
7059
|
continue;
|
|
7007
7060
|
}
|
|
7008
|
-
// Log structured error details and rethrow
|
|
7009
|
-
|
|
7010
|
-
operation
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7061
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7062
|
+
if (isConnectionError) {
|
|
7063
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
7064
|
+
operation: 'updateManyAllocation',
|
|
7065
|
+
model: 'Allocation',
|
|
7066
|
+
error: String(error),
|
|
7067
|
+
isRetryable: true,
|
|
7068
|
+
transient: true,
|
|
7069
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7070
|
+
});
|
|
7071
|
+
}
|
|
7072
|
+
else {
|
|
7073
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
7074
|
+
operation: 'updateManyAllocation',
|
|
7075
|
+
model: 'Allocation',
|
|
7076
|
+
error: String(error),
|
|
7077
|
+
isRetryable: false,
|
|
7078
|
+
});
|
|
7079
|
+
}
|
|
7015
7080
|
throw error;
|
|
7016
7081
|
}
|
|
7017
7082
|
}
|
|
@@ -7134,14 +7199,27 @@ exports.Allocation = {
|
|
|
7134
7199
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7135
7200
|
continue;
|
|
7136
7201
|
}
|
|
7137
|
-
// Log structured error details and rethrow
|
|
7138
|
-
|
|
7139
|
-
operation
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7202
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7203
|
+
if (isConnectionError) {
|
|
7204
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
7205
|
+
operation: 'deleteOneAllocation',
|
|
7206
|
+
model: 'Allocation',
|
|
7207
|
+
error: String(error),
|
|
7208
|
+
recordId: props.id,
|
|
7209
|
+
isRetryable: true,
|
|
7210
|
+
transient: true,
|
|
7211
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7212
|
+
});
|
|
7213
|
+
}
|
|
7214
|
+
else {
|
|
7215
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
7216
|
+
operation: 'deleteOneAllocation',
|
|
7217
|
+
model: 'Allocation',
|
|
7218
|
+
error: String(error),
|
|
7219
|
+
recordId: props.id,
|
|
7220
|
+
isRetryable: false,
|
|
7221
|
+
});
|
|
7222
|
+
}
|
|
7145
7223
|
throw error;
|
|
7146
7224
|
}
|
|
7147
7225
|
}
|
|
@@ -7238,13 +7316,25 @@ exports.Allocation = {
|
|
|
7238
7316
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7239
7317
|
continue;
|
|
7240
7318
|
}
|
|
7241
|
-
// Log structured error details and rethrow
|
|
7242
|
-
|
|
7243
|
-
operation
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7319
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7320
|
+
if (isConnectionError) {
|
|
7321
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
7322
|
+
operation: 'getAllocation',
|
|
7323
|
+
model: 'Allocation',
|
|
7324
|
+
error: String(error),
|
|
7325
|
+
isRetryable: true,
|
|
7326
|
+
transient: true,
|
|
7327
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7328
|
+
});
|
|
7329
|
+
}
|
|
7330
|
+
else {
|
|
7331
|
+
logger_1.logger.error("Database get operation failed", {
|
|
7332
|
+
operation: 'getAllocation',
|
|
7333
|
+
model: 'Allocation',
|
|
7334
|
+
error: String(error),
|
|
7335
|
+
isRetryable: false,
|
|
7336
|
+
});
|
|
7337
|
+
}
|
|
7248
7338
|
throw error;
|
|
7249
7339
|
}
|
|
7250
7340
|
}
|
|
@@ -7331,13 +7421,25 @@ exports.Allocation = {
|
|
|
7331
7421
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7332
7422
|
continue;
|
|
7333
7423
|
}
|
|
7334
|
-
// Log structured error details and rethrow
|
|
7335
|
-
|
|
7336
|
-
operation
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7424
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7425
|
+
if (isConnectionError) {
|
|
7426
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
7427
|
+
operation: 'getAllAllocation',
|
|
7428
|
+
model: 'Allocation',
|
|
7429
|
+
error: String(error),
|
|
7430
|
+
isRetryable: true,
|
|
7431
|
+
transient: true,
|
|
7432
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7433
|
+
});
|
|
7434
|
+
}
|
|
7435
|
+
else {
|
|
7436
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
7437
|
+
operation: 'getAllAllocation',
|
|
7438
|
+
model: 'Allocation',
|
|
7439
|
+
error: String(error),
|
|
7440
|
+
isRetryable: false,
|
|
7441
|
+
});
|
|
7442
|
+
}
|
|
7341
7443
|
throw error;
|
|
7342
7444
|
}
|
|
7343
7445
|
}
|
|
@@ -7448,13 +7550,25 @@ exports.Allocation = {
|
|
|
7448
7550
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7449
7551
|
continue;
|
|
7450
7552
|
}
|
|
7451
|
-
// Log structured error details and rethrow
|
|
7452
|
-
|
|
7453
|
-
operation
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7553
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7554
|
+
if (isConnectionError) {
|
|
7555
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
7556
|
+
operation: 'findManyAllocation',
|
|
7557
|
+
model: 'Allocation',
|
|
7558
|
+
error: String(error),
|
|
7559
|
+
isRetryable: true,
|
|
7560
|
+
transient: true,
|
|
7561
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7562
|
+
});
|
|
7563
|
+
}
|
|
7564
|
+
else {
|
|
7565
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
7566
|
+
operation: 'findManyAllocation',
|
|
7567
|
+
model: 'Allocation',
|
|
7568
|
+
error: String(error),
|
|
7569
|
+
isRetryable: false,
|
|
7570
|
+
});
|
|
7571
|
+
}
|
|
7458
7572
|
throw error;
|
|
7459
7573
|
}
|
|
7460
7574
|
}
|
package/AlpacaAccount.cjs
CHANGED
|
@@ -765,13 +765,28 @@ exports.AlpacaAccount = {
|
|
|
765
765
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
766
766
|
continue;
|
|
767
767
|
}
|
|
768
|
-
// Log structured error details and rethrow
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
768
|
+
// Log structured error details and rethrow.
|
|
769
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
770
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
771
|
+
// from true defects.
|
|
772
|
+
if (isConnectionError) {
|
|
773
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
774
|
+
operation: 'createOneAlpacaAccount',
|
|
775
|
+
model: 'AlpacaAccount',
|
|
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 create operation failed", {
|
|
784
|
+
operation: 'createOneAlpacaAccount',
|
|
785
|
+
model: 'AlpacaAccount',
|
|
786
|
+
error: String(error),
|
|
787
|
+
isRetryable: false,
|
|
788
|
+
});
|
|
789
|
+
}
|
|
775
790
|
throw error;
|
|
776
791
|
}
|
|
777
792
|
}
|
|
@@ -916,13 +931,25 @@ exports.AlpacaAccount = {
|
|
|
916
931
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
917
932
|
continue;
|
|
918
933
|
}
|
|
919
|
-
// Log structured error details and rethrow
|
|
920
|
-
|
|
921
|
-
operation
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
934
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
935
|
+
if (isConnectionError) {
|
|
936
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
937
|
+
operation: 'createManyAlpacaAccount',
|
|
938
|
+
model: 'AlpacaAccount',
|
|
939
|
+
error: String(error),
|
|
940
|
+
isRetryable: true,
|
|
941
|
+
transient: true,
|
|
942
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
else {
|
|
946
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
947
|
+
operation: 'createManyAlpacaAccount',
|
|
948
|
+
model: 'AlpacaAccount',
|
|
949
|
+
error: String(error),
|
|
950
|
+
isRetryable: false,
|
|
951
|
+
});
|
|
952
|
+
}
|
|
926
953
|
throw error;
|
|
927
954
|
}
|
|
928
955
|
}
|
|
@@ -2493,14 +2520,27 @@ exports.AlpacaAccount = {
|
|
|
2493
2520
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2494
2521
|
continue;
|
|
2495
2522
|
}
|
|
2496
|
-
// Log structured error details and rethrow
|
|
2497
|
-
|
|
2498
|
-
operation
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2523
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2524
|
+
if (isConnectionError) {
|
|
2525
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
2526
|
+
operation: 'updateOneAlpacaAccount',
|
|
2527
|
+
model: 'AlpacaAccount',
|
|
2528
|
+
error: String(error),
|
|
2529
|
+
recordId: props.id,
|
|
2530
|
+
isRetryable: true,
|
|
2531
|
+
transient: true,
|
|
2532
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2533
|
+
});
|
|
2534
|
+
}
|
|
2535
|
+
else {
|
|
2536
|
+
logger_1.logger.error("Database update operation failed", {
|
|
2537
|
+
operation: 'updateOneAlpacaAccount',
|
|
2538
|
+
model: 'AlpacaAccount',
|
|
2539
|
+
error: String(error),
|
|
2540
|
+
recordId: props.id,
|
|
2541
|
+
isRetryable: false,
|
|
2542
|
+
});
|
|
2543
|
+
}
|
|
2504
2544
|
throw error;
|
|
2505
2545
|
}
|
|
2506
2546
|
}
|
|
@@ -4561,14 +4601,27 @@ exports.AlpacaAccount = {
|
|
|
4561
4601
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4562
4602
|
continue;
|
|
4563
4603
|
}
|
|
4564
|
-
// Log structured error details and rethrow
|
|
4565
|
-
|
|
4566
|
-
operation
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4604
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4605
|
+
if (isConnectionError) {
|
|
4606
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
4607
|
+
operation: 'upsertOneAlpacaAccount',
|
|
4608
|
+
model: 'AlpacaAccount',
|
|
4609
|
+
error: String(error),
|
|
4610
|
+
recordId: props.id,
|
|
4611
|
+
isRetryable: true,
|
|
4612
|
+
transient: true,
|
|
4613
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4614
|
+
});
|
|
4615
|
+
}
|
|
4616
|
+
else {
|
|
4617
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
4618
|
+
operation: 'upsertOneAlpacaAccount',
|
|
4619
|
+
model: 'AlpacaAccount',
|
|
4620
|
+
error: String(error),
|
|
4621
|
+
recordId: props.id,
|
|
4622
|
+
isRetryable: false,
|
|
4623
|
+
});
|
|
4624
|
+
}
|
|
4572
4625
|
throw error;
|
|
4573
4626
|
}
|
|
4574
4627
|
}
|
|
@@ -6137,13 +6190,25 @@ exports.AlpacaAccount = {
|
|
|
6137
6190
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6138
6191
|
continue;
|
|
6139
6192
|
}
|
|
6140
|
-
// Log structured error details and rethrow
|
|
6141
|
-
|
|
6142
|
-
operation
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6193
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6194
|
+
if (isConnectionError) {
|
|
6195
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
6196
|
+
operation: 'updateManyAlpacaAccount',
|
|
6197
|
+
model: 'AlpacaAccount',
|
|
6198
|
+
error: String(error),
|
|
6199
|
+
isRetryable: true,
|
|
6200
|
+
transient: true,
|
|
6201
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6202
|
+
});
|
|
6203
|
+
}
|
|
6204
|
+
else {
|
|
6205
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
6206
|
+
operation: 'updateManyAlpacaAccount',
|
|
6207
|
+
model: 'AlpacaAccount',
|
|
6208
|
+
error: String(error),
|
|
6209
|
+
isRetryable: false,
|
|
6210
|
+
});
|
|
6211
|
+
}
|
|
6147
6212
|
throw error;
|
|
6148
6213
|
}
|
|
6149
6214
|
}
|
|
@@ -6266,14 +6331,27 @@ exports.AlpacaAccount = {
|
|
|
6266
6331
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6267
6332
|
continue;
|
|
6268
6333
|
}
|
|
6269
|
-
// Log structured error details and rethrow
|
|
6270
|
-
|
|
6271
|
-
operation
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6334
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6335
|
+
if (isConnectionError) {
|
|
6336
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
6337
|
+
operation: 'deleteOneAlpacaAccount',
|
|
6338
|
+
model: 'AlpacaAccount',
|
|
6339
|
+
error: String(error),
|
|
6340
|
+
recordId: props.id,
|
|
6341
|
+
isRetryable: true,
|
|
6342
|
+
transient: true,
|
|
6343
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6344
|
+
});
|
|
6345
|
+
}
|
|
6346
|
+
else {
|
|
6347
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
6348
|
+
operation: 'deleteOneAlpacaAccount',
|
|
6349
|
+
model: 'AlpacaAccount',
|
|
6350
|
+
error: String(error),
|
|
6351
|
+
recordId: props.id,
|
|
6352
|
+
isRetryable: false,
|
|
6353
|
+
});
|
|
6354
|
+
}
|
|
6277
6355
|
throw error;
|
|
6278
6356
|
}
|
|
6279
6357
|
}
|
|
@@ -6375,13 +6453,25 @@ exports.AlpacaAccount = {
|
|
|
6375
6453
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6376
6454
|
continue;
|
|
6377
6455
|
}
|
|
6378
|
-
// Log structured error details and rethrow
|
|
6379
|
-
|
|
6380
|
-
operation
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6456
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6457
|
+
if (isConnectionError) {
|
|
6458
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
6459
|
+
operation: 'getAlpacaAccount',
|
|
6460
|
+
model: 'AlpacaAccount',
|
|
6461
|
+
error: String(error),
|
|
6462
|
+
isRetryable: true,
|
|
6463
|
+
transient: true,
|
|
6464
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6465
|
+
});
|
|
6466
|
+
}
|
|
6467
|
+
else {
|
|
6468
|
+
logger_1.logger.error("Database get operation failed", {
|
|
6469
|
+
operation: 'getAlpacaAccount',
|
|
6470
|
+
model: 'AlpacaAccount',
|
|
6471
|
+
error: String(error),
|
|
6472
|
+
isRetryable: false,
|
|
6473
|
+
});
|
|
6474
|
+
}
|
|
6385
6475
|
throw error;
|
|
6386
6476
|
}
|
|
6387
6477
|
}
|
|
@@ -6468,13 +6558,25 @@ exports.AlpacaAccount = {
|
|
|
6468
6558
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6469
6559
|
continue;
|
|
6470
6560
|
}
|
|
6471
|
-
// Log structured error details and rethrow
|
|
6472
|
-
|
|
6473
|
-
operation
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6561
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6562
|
+
if (isConnectionError) {
|
|
6563
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
6564
|
+
operation: 'getAllAlpacaAccount',
|
|
6565
|
+
model: 'AlpacaAccount',
|
|
6566
|
+
error: String(error),
|
|
6567
|
+
isRetryable: true,
|
|
6568
|
+
transient: true,
|
|
6569
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6570
|
+
});
|
|
6571
|
+
}
|
|
6572
|
+
else {
|
|
6573
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
6574
|
+
operation: 'getAllAlpacaAccount',
|
|
6575
|
+
model: 'AlpacaAccount',
|
|
6576
|
+
error: String(error),
|
|
6577
|
+
isRetryable: false,
|
|
6578
|
+
});
|
|
6579
|
+
}
|
|
6478
6580
|
throw error;
|
|
6479
6581
|
}
|
|
6480
6582
|
}
|
|
@@ -6588,13 +6690,25 @@ exports.AlpacaAccount = {
|
|
|
6588
6690
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6589
6691
|
continue;
|
|
6590
6692
|
}
|
|
6591
|
-
// Log structured error details and rethrow
|
|
6592
|
-
|
|
6593
|
-
operation
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6693
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6694
|
+
if (isConnectionError) {
|
|
6695
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
6696
|
+
operation: 'findManyAlpacaAccount',
|
|
6697
|
+
model: 'AlpacaAccount',
|
|
6698
|
+
error: String(error),
|
|
6699
|
+
isRetryable: true,
|
|
6700
|
+
transient: true,
|
|
6701
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6702
|
+
});
|
|
6703
|
+
}
|
|
6704
|
+
else {
|
|
6705
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
6706
|
+
operation: 'findManyAlpacaAccount',
|
|
6707
|
+
model: 'AlpacaAccount',
|
|
6708
|
+
error: String(error),
|
|
6709
|
+
isRetryable: false,
|
|
6710
|
+
});
|
|
6711
|
+
}
|
|
6598
6712
|
throw error;
|
|
6599
6713
|
}
|
|
6600
6714
|
}
|