@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/Alert.mjs
CHANGED
|
@@ -601,13 +601,28 @@ export const Alert = {
|
|
|
601
601
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
602
602
|
continue;
|
|
603
603
|
}
|
|
604
|
-
// Log structured error details and rethrow
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
604
|
+
// Log structured error details and rethrow.
|
|
605
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
606
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
607
|
+
// from true defects.
|
|
608
|
+
if (isConnectionError) {
|
|
609
|
+
logger.warn("Database create operation failed (transient after retries)", {
|
|
610
|
+
operation: 'createOneAlert',
|
|
611
|
+
model: 'Alert',
|
|
612
|
+
error: String(error),
|
|
613
|
+
isRetryable: true,
|
|
614
|
+
transient: true,
|
|
615
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
logger.error("Database create operation failed", {
|
|
620
|
+
operation: 'createOneAlert',
|
|
621
|
+
model: 'Alert',
|
|
622
|
+
error: String(error),
|
|
623
|
+
isRetryable: false,
|
|
624
|
+
});
|
|
625
|
+
}
|
|
611
626
|
throw error;
|
|
612
627
|
}
|
|
613
628
|
}
|
|
@@ -737,13 +752,25 @@ export const Alert = {
|
|
|
737
752
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
738
753
|
continue;
|
|
739
754
|
}
|
|
740
|
-
// Log structured error details and rethrow
|
|
741
|
-
|
|
742
|
-
operation
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
755
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
756
|
+
if (isConnectionError) {
|
|
757
|
+
logger.warn("Database createMany operation failed (transient after retries)", {
|
|
758
|
+
operation: 'createManyAlert',
|
|
759
|
+
model: 'Alert',
|
|
760
|
+
error: String(error),
|
|
761
|
+
isRetryable: true,
|
|
762
|
+
transient: true,
|
|
763
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
else {
|
|
767
|
+
logger.error("Database createMany operation failed", {
|
|
768
|
+
operation: 'createManyAlert',
|
|
769
|
+
model: 'Alert',
|
|
770
|
+
error: String(error),
|
|
771
|
+
isRetryable: false,
|
|
772
|
+
});
|
|
773
|
+
}
|
|
747
774
|
throw error;
|
|
748
775
|
}
|
|
749
776
|
}
|
|
@@ -2635,14 +2662,27 @@ export const Alert = {
|
|
|
2635
2662
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2636
2663
|
continue;
|
|
2637
2664
|
}
|
|
2638
|
-
// Log structured error details and rethrow
|
|
2639
|
-
|
|
2640
|
-
operation
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2665
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2666
|
+
if (isConnectionError) {
|
|
2667
|
+
logger.warn("Database update operation failed (transient after retries)", {
|
|
2668
|
+
operation: 'updateOneAlert',
|
|
2669
|
+
model: 'Alert',
|
|
2670
|
+
error: String(error),
|
|
2671
|
+
recordId: props.id,
|
|
2672
|
+
isRetryable: true,
|
|
2673
|
+
transient: true,
|
|
2674
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2675
|
+
});
|
|
2676
|
+
}
|
|
2677
|
+
else {
|
|
2678
|
+
logger.error("Database update operation failed", {
|
|
2679
|
+
operation: 'updateOneAlert',
|
|
2680
|
+
model: 'Alert',
|
|
2681
|
+
error: String(error),
|
|
2682
|
+
recordId: props.id,
|
|
2683
|
+
isRetryable: false,
|
|
2684
|
+
});
|
|
2685
|
+
}
|
|
2646
2686
|
throw error;
|
|
2647
2687
|
}
|
|
2648
2688
|
}
|
|
@@ -5001,14 +5041,27 @@ export const Alert = {
|
|
|
5001
5041
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
5002
5042
|
continue;
|
|
5003
5043
|
}
|
|
5004
|
-
// Log structured error details and rethrow
|
|
5005
|
-
|
|
5006
|
-
operation
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5044
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
5045
|
+
if (isConnectionError) {
|
|
5046
|
+
logger.warn("Database upsert operation failed (transient after retries)", {
|
|
5047
|
+
operation: 'upsertOneAlert',
|
|
5048
|
+
model: 'Alert',
|
|
5049
|
+
error: String(error),
|
|
5050
|
+
recordId: props.id,
|
|
5051
|
+
isRetryable: true,
|
|
5052
|
+
transient: true,
|
|
5053
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
5054
|
+
});
|
|
5055
|
+
}
|
|
5056
|
+
else {
|
|
5057
|
+
logger.error("Database upsert operation failed", {
|
|
5058
|
+
operation: 'upsertOneAlert',
|
|
5059
|
+
model: 'Alert',
|
|
5060
|
+
error: String(error),
|
|
5061
|
+
recordId: props.id,
|
|
5062
|
+
isRetryable: false,
|
|
5063
|
+
});
|
|
5064
|
+
}
|
|
5012
5065
|
throw error;
|
|
5013
5066
|
}
|
|
5014
5067
|
}
|
|
@@ -6898,13 +6951,25 @@ export const Alert = {
|
|
|
6898
6951
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6899
6952
|
continue;
|
|
6900
6953
|
}
|
|
6901
|
-
// Log structured error details and rethrow
|
|
6902
|
-
|
|
6903
|
-
operation
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6954
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6955
|
+
if (isConnectionError) {
|
|
6956
|
+
logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
6957
|
+
operation: 'updateManyAlert',
|
|
6958
|
+
model: 'Alert',
|
|
6959
|
+
error: String(error),
|
|
6960
|
+
isRetryable: true,
|
|
6961
|
+
transient: true,
|
|
6962
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6963
|
+
});
|
|
6964
|
+
}
|
|
6965
|
+
else {
|
|
6966
|
+
logger.error("Database updateMany operation failed", {
|
|
6967
|
+
operation: 'updateManyAlert',
|
|
6968
|
+
model: 'Alert',
|
|
6969
|
+
error: String(error),
|
|
6970
|
+
isRetryable: false,
|
|
6971
|
+
});
|
|
6972
|
+
}
|
|
6908
6973
|
throw error;
|
|
6909
6974
|
}
|
|
6910
6975
|
}
|
|
@@ -7026,14 +7091,27 @@ export const Alert = {
|
|
|
7026
7091
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7027
7092
|
continue;
|
|
7028
7093
|
}
|
|
7029
|
-
// Log structured error details and rethrow
|
|
7030
|
-
|
|
7031
|
-
operation
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7094
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7095
|
+
if (isConnectionError) {
|
|
7096
|
+
logger.warn("Database delete operation failed (transient after retries)", {
|
|
7097
|
+
operation: 'deleteOneAlert',
|
|
7098
|
+
model: 'Alert',
|
|
7099
|
+
error: String(error),
|
|
7100
|
+
recordId: props.id,
|
|
7101
|
+
isRetryable: true,
|
|
7102
|
+
transient: true,
|
|
7103
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7104
|
+
});
|
|
7105
|
+
}
|
|
7106
|
+
else {
|
|
7107
|
+
logger.error("Database delete operation failed", {
|
|
7108
|
+
operation: 'deleteOneAlert',
|
|
7109
|
+
model: 'Alert',
|
|
7110
|
+
error: String(error),
|
|
7111
|
+
recordId: props.id,
|
|
7112
|
+
isRetryable: false,
|
|
7113
|
+
});
|
|
7114
|
+
}
|
|
7037
7115
|
throw error;
|
|
7038
7116
|
}
|
|
7039
7117
|
}
|
|
@@ -7140,13 +7218,25 @@ export const Alert = {
|
|
|
7140
7218
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7141
7219
|
continue;
|
|
7142
7220
|
}
|
|
7143
|
-
// Log structured error details and rethrow
|
|
7144
|
-
|
|
7145
|
-
operation
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7221
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7222
|
+
if (isConnectionError) {
|
|
7223
|
+
logger.warn("Database get operation failed (transient after retries)", {
|
|
7224
|
+
operation: 'getAlert',
|
|
7225
|
+
model: 'Alert',
|
|
7226
|
+
error: String(error),
|
|
7227
|
+
isRetryable: true,
|
|
7228
|
+
transient: true,
|
|
7229
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7230
|
+
});
|
|
7231
|
+
}
|
|
7232
|
+
else {
|
|
7233
|
+
logger.error("Database get operation failed", {
|
|
7234
|
+
operation: 'getAlert',
|
|
7235
|
+
model: 'Alert',
|
|
7236
|
+
error: String(error),
|
|
7237
|
+
isRetryable: false,
|
|
7238
|
+
});
|
|
7239
|
+
}
|
|
7150
7240
|
throw error;
|
|
7151
7241
|
}
|
|
7152
7242
|
}
|
|
@@ -7232,13 +7322,25 @@ export const Alert = {
|
|
|
7232
7322
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7233
7323
|
continue;
|
|
7234
7324
|
}
|
|
7235
|
-
// Log structured error details and rethrow
|
|
7236
|
-
|
|
7237
|
-
operation
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7325
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7326
|
+
if (isConnectionError) {
|
|
7327
|
+
logger.warn("Database getAll operation failed (transient after retries)", {
|
|
7328
|
+
operation: 'getAllAlert',
|
|
7329
|
+
model: 'Alert',
|
|
7330
|
+
error: String(error),
|
|
7331
|
+
isRetryable: true,
|
|
7332
|
+
transient: true,
|
|
7333
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7334
|
+
});
|
|
7335
|
+
}
|
|
7336
|
+
else {
|
|
7337
|
+
logger.error("Database getAll operation failed", {
|
|
7338
|
+
operation: 'getAllAlert',
|
|
7339
|
+
model: 'Alert',
|
|
7340
|
+
error: String(error),
|
|
7341
|
+
isRetryable: false,
|
|
7342
|
+
});
|
|
7343
|
+
}
|
|
7242
7344
|
throw error;
|
|
7243
7345
|
}
|
|
7244
7346
|
}
|
|
@@ -7357,13 +7459,25 @@ export const Alert = {
|
|
|
7357
7459
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7358
7460
|
continue;
|
|
7359
7461
|
}
|
|
7360
|
-
// Log structured error details and rethrow
|
|
7361
|
-
|
|
7362
|
-
operation
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7462
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7463
|
+
if (isConnectionError) {
|
|
7464
|
+
logger.warn("Database findMany operation failed (transient after retries)", {
|
|
7465
|
+
operation: 'findManyAlert',
|
|
7466
|
+
model: 'Alert',
|
|
7467
|
+
error: String(error),
|
|
7468
|
+
isRetryable: true,
|
|
7469
|
+
transient: true,
|
|
7470
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7471
|
+
});
|
|
7472
|
+
}
|
|
7473
|
+
else {
|
|
7474
|
+
logger.error("Database findMany operation failed", {
|
|
7475
|
+
operation: 'findManyAlert',
|
|
7476
|
+
model: 'Alert',
|
|
7477
|
+
error: String(error),
|
|
7478
|
+
isRetryable: false,
|
|
7479
|
+
});
|
|
7480
|
+
}
|
|
7367
7481
|
throw error;
|
|
7368
7482
|
}
|
|
7369
7483
|
}
|
package/esm/Allocation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Allocation.d.ts","sourceRoot":"","sources":["../../src/Allocation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAChG,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AA0BpG,eAAO,MAAM,UAAU;IAErB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,cAAc,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Allocation.d.ts","sourceRoot":"","sources":["../../src/Allocation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAChG,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AA0BpG,eAAO,MAAM,UAAU;IAErB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,cAAc,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAqnBtH;;;;;;;OAOG;sBACqB,cAAc,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,YAAY;QAAE,cAAc,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAsJ5K;;;;;;OAMG;kBACiB,cAAc,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAk6DpH;;;;;;OAMG;kBACiB,cAAc,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IA22EpH;;;;;;OAMG;sBACqB,cAAc,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAs5DpI;;;;;;OAMG;kBACiB,cAAc,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAqJpH;;;;;;;OAOG;eACc,cAAc,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAsH9J;;;;;OAKG;0BACyB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC;IA6GtG;;;;;;;OAOG;oBACmB,cAAc,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC;CAoItK,CAAC"}
|