@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
package/esm/Allocation.mjs
CHANGED
|
@@ -620,13 +620,28 @@ export const Allocation = {
|
|
|
620
620
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
621
621
|
continue;
|
|
622
622
|
}
|
|
623
|
-
// Log structured error details and rethrow
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
623
|
+
// Log structured error details and rethrow.
|
|
624
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
625
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
626
|
+
// from true defects.
|
|
627
|
+
if (isConnectionError) {
|
|
628
|
+
logger.warn("Database create operation failed (transient after retries)", {
|
|
629
|
+
operation: 'createOneAllocation',
|
|
630
|
+
model: 'Allocation',
|
|
631
|
+
error: String(error),
|
|
632
|
+
isRetryable: true,
|
|
633
|
+
transient: true,
|
|
634
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
logger.error("Database create operation failed", {
|
|
639
|
+
operation: 'createOneAllocation',
|
|
640
|
+
model: 'Allocation',
|
|
641
|
+
error: String(error),
|
|
642
|
+
isRetryable: false,
|
|
643
|
+
});
|
|
644
|
+
}
|
|
630
645
|
throw error;
|
|
631
646
|
}
|
|
632
647
|
}
|
|
@@ -752,13 +767,25 @@ export const Allocation = {
|
|
|
752
767
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
753
768
|
continue;
|
|
754
769
|
}
|
|
755
|
-
// Log structured error details and rethrow
|
|
756
|
-
|
|
757
|
-
operation
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
770
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
771
|
+
if (isConnectionError) {
|
|
772
|
+
logger.warn("Database createMany operation failed (transient after retries)", {
|
|
773
|
+
operation: 'createManyAllocation',
|
|
774
|
+
model: 'Allocation',
|
|
775
|
+
error: String(error),
|
|
776
|
+
isRetryable: true,
|
|
777
|
+
transient: true,
|
|
778
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
else {
|
|
782
|
+
logger.error("Database createMany operation failed", {
|
|
783
|
+
operation: 'createManyAllocation',
|
|
784
|
+
model: 'Allocation',
|
|
785
|
+
error: String(error),
|
|
786
|
+
isRetryable: false,
|
|
787
|
+
});
|
|
788
|
+
}
|
|
762
789
|
throw error;
|
|
763
790
|
}
|
|
764
791
|
}
|
|
@@ -2684,14 +2711,27 @@ export const Allocation = {
|
|
|
2684
2711
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2685
2712
|
continue;
|
|
2686
2713
|
}
|
|
2687
|
-
// Log structured error details and rethrow
|
|
2688
|
-
|
|
2689
|
-
operation
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2714
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2715
|
+
if (isConnectionError) {
|
|
2716
|
+
logger.warn("Database update operation failed (transient after retries)", {
|
|
2717
|
+
operation: 'updateOneAllocation',
|
|
2718
|
+
model: 'Allocation',
|
|
2719
|
+
error: String(error),
|
|
2720
|
+
recordId: props.id,
|
|
2721
|
+
isRetryable: true,
|
|
2722
|
+
transient: true,
|
|
2723
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2724
|
+
});
|
|
2725
|
+
}
|
|
2726
|
+
else {
|
|
2727
|
+
logger.error("Database update operation failed", {
|
|
2728
|
+
operation: 'updateOneAllocation',
|
|
2729
|
+
model: 'Allocation',
|
|
2730
|
+
error: String(error),
|
|
2731
|
+
recordId: props.id,
|
|
2732
|
+
isRetryable: false,
|
|
2733
|
+
});
|
|
2734
|
+
}
|
|
2695
2735
|
throw error;
|
|
2696
2736
|
}
|
|
2697
2737
|
}
|
|
@@ -5075,14 +5115,27 @@ export const Allocation = {
|
|
|
5075
5115
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
5076
5116
|
continue;
|
|
5077
5117
|
}
|
|
5078
|
-
// Log structured error details and rethrow
|
|
5079
|
-
|
|
5080
|
-
operation
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5118
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
5119
|
+
if (isConnectionError) {
|
|
5120
|
+
logger.warn("Database upsert operation failed (transient after retries)", {
|
|
5121
|
+
operation: 'upsertOneAllocation',
|
|
5122
|
+
model: 'Allocation',
|
|
5123
|
+
error: String(error),
|
|
5124
|
+
recordId: props.id,
|
|
5125
|
+
isRetryable: true,
|
|
5126
|
+
transient: true,
|
|
5127
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
5128
|
+
});
|
|
5129
|
+
}
|
|
5130
|
+
else {
|
|
5131
|
+
logger.error("Database upsert operation failed", {
|
|
5132
|
+
operation: 'upsertOneAllocation',
|
|
5133
|
+
model: 'Allocation',
|
|
5134
|
+
error: String(error),
|
|
5135
|
+
recordId: props.id,
|
|
5136
|
+
isRetryable: false,
|
|
5137
|
+
});
|
|
5138
|
+
}
|
|
5086
5139
|
throw error;
|
|
5087
5140
|
}
|
|
5088
5141
|
}
|
|
@@ -6997,13 +7050,25 @@ export const Allocation = {
|
|
|
6997
7050
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6998
7051
|
continue;
|
|
6999
7052
|
}
|
|
7000
|
-
// Log structured error details and rethrow
|
|
7001
|
-
|
|
7002
|
-
operation
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7053
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7054
|
+
if (isConnectionError) {
|
|
7055
|
+
logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
7056
|
+
operation: 'updateManyAllocation',
|
|
7057
|
+
model: 'Allocation',
|
|
7058
|
+
error: String(error),
|
|
7059
|
+
isRetryable: true,
|
|
7060
|
+
transient: true,
|
|
7061
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7062
|
+
});
|
|
7063
|
+
}
|
|
7064
|
+
else {
|
|
7065
|
+
logger.error("Database updateMany operation failed", {
|
|
7066
|
+
operation: 'updateManyAllocation',
|
|
7067
|
+
model: 'Allocation',
|
|
7068
|
+
error: String(error),
|
|
7069
|
+
isRetryable: false,
|
|
7070
|
+
});
|
|
7071
|
+
}
|
|
7007
7072
|
throw error;
|
|
7008
7073
|
}
|
|
7009
7074
|
}
|
|
@@ -7125,14 +7190,27 @@ export const Allocation = {
|
|
|
7125
7190
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7126
7191
|
continue;
|
|
7127
7192
|
}
|
|
7128
|
-
// Log structured error details and rethrow
|
|
7129
|
-
|
|
7130
|
-
operation
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7193
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7194
|
+
if (isConnectionError) {
|
|
7195
|
+
logger.warn("Database delete operation failed (transient after retries)", {
|
|
7196
|
+
operation: 'deleteOneAllocation',
|
|
7197
|
+
model: 'Allocation',
|
|
7198
|
+
error: String(error),
|
|
7199
|
+
recordId: props.id,
|
|
7200
|
+
isRetryable: true,
|
|
7201
|
+
transient: true,
|
|
7202
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7203
|
+
});
|
|
7204
|
+
}
|
|
7205
|
+
else {
|
|
7206
|
+
logger.error("Database delete operation failed", {
|
|
7207
|
+
operation: 'deleteOneAllocation',
|
|
7208
|
+
model: 'Allocation',
|
|
7209
|
+
error: String(error),
|
|
7210
|
+
recordId: props.id,
|
|
7211
|
+
isRetryable: false,
|
|
7212
|
+
});
|
|
7213
|
+
}
|
|
7136
7214
|
throw error;
|
|
7137
7215
|
}
|
|
7138
7216
|
}
|
|
@@ -7228,13 +7306,25 @@ export const Allocation = {
|
|
|
7228
7306
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7229
7307
|
continue;
|
|
7230
7308
|
}
|
|
7231
|
-
// Log structured error details and rethrow
|
|
7232
|
-
|
|
7233
|
-
operation
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7309
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7310
|
+
if (isConnectionError) {
|
|
7311
|
+
logger.warn("Database get operation failed (transient after retries)", {
|
|
7312
|
+
operation: 'getAllocation',
|
|
7313
|
+
model: 'Allocation',
|
|
7314
|
+
error: String(error),
|
|
7315
|
+
isRetryable: true,
|
|
7316
|
+
transient: true,
|
|
7317
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7318
|
+
});
|
|
7319
|
+
}
|
|
7320
|
+
else {
|
|
7321
|
+
logger.error("Database get operation failed", {
|
|
7322
|
+
operation: 'getAllocation',
|
|
7323
|
+
model: 'Allocation',
|
|
7324
|
+
error: String(error),
|
|
7325
|
+
isRetryable: false,
|
|
7326
|
+
});
|
|
7327
|
+
}
|
|
7238
7328
|
throw error;
|
|
7239
7329
|
}
|
|
7240
7330
|
}
|
|
@@ -7320,13 +7410,25 @@ export const Allocation = {
|
|
|
7320
7410
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7321
7411
|
continue;
|
|
7322
7412
|
}
|
|
7323
|
-
// Log structured error details and rethrow
|
|
7324
|
-
|
|
7325
|
-
operation
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7413
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7414
|
+
if (isConnectionError) {
|
|
7415
|
+
logger.warn("Database getAll operation failed (transient after retries)", {
|
|
7416
|
+
operation: 'getAllAllocation',
|
|
7417
|
+
model: 'Allocation',
|
|
7418
|
+
error: String(error),
|
|
7419
|
+
isRetryable: true,
|
|
7420
|
+
transient: true,
|
|
7421
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7422
|
+
});
|
|
7423
|
+
}
|
|
7424
|
+
else {
|
|
7425
|
+
logger.error("Database getAll operation failed", {
|
|
7426
|
+
operation: 'getAllAllocation',
|
|
7427
|
+
model: 'Allocation',
|
|
7428
|
+
error: String(error),
|
|
7429
|
+
isRetryable: false,
|
|
7430
|
+
});
|
|
7431
|
+
}
|
|
7330
7432
|
throw error;
|
|
7331
7433
|
}
|
|
7332
7434
|
}
|
|
@@ -7436,13 +7538,25 @@ export const Allocation = {
|
|
|
7436
7538
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7437
7539
|
continue;
|
|
7438
7540
|
}
|
|
7439
|
-
// Log structured error details and rethrow
|
|
7440
|
-
|
|
7441
|
-
operation
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7541
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7542
|
+
if (isConnectionError) {
|
|
7543
|
+
logger.warn("Database findMany operation failed (transient after retries)", {
|
|
7544
|
+
operation: 'findManyAllocation',
|
|
7545
|
+
model: 'Allocation',
|
|
7546
|
+
error: String(error),
|
|
7547
|
+
isRetryable: true,
|
|
7548
|
+
transient: true,
|
|
7549
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7550
|
+
});
|
|
7551
|
+
}
|
|
7552
|
+
else {
|
|
7553
|
+
logger.error("Database findMany operation failed", {
|
|
7554
|
+
operation: 'findManyAllocation',
|
|
7555
|
+
model: 'Allocation',
|
|
7556
|
+
error: String(error),
|
|
7557
|
+
isRetryable: false,
|
|
7558
|
+
});
|
|
7559
|
+
}
|
|
7446
7560
|
throw error;
|
|
7447
7561
|
}
|
|
7448
7562
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlpacaAccount.d.ts","sourceRoot":"","sources":["../../src/AlpacaAccount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACzG,OAAO,EA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