@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
|
@@ -188,13 +188,28 @@ exports.AccountDecisionRecord = {
|
|
|
188
188
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
189
189
|
continue;
|
|
190
190
|
}
|
|
191
|
-
// Log structured error details and rethrow
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
191
|
+
// Log structured error details and rethrow.
|
|
192
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
193
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
194
|
+
// from true defects.
|
|
195
|
+
if (isConnectionError) {
|
|
196
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
197
|
+
operation: 'createOneAccountDecisionRecord',
|
|
198
|
+
model: 'AccountDecisionRecord',
|
|
199
|
+
error: String(error),
|
|
200
|
+
isRetryable: true,
|
|
201
|
+
transient: true,
|
|
202
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
logger_1.logger.error("Database create operation failed", {
|
|
207
|
+
operation: 'createOneAccountDecisionRecord',
|
|
208
|
+
model: 'AccountDecisionRecord',
|
|
209
|
+
error: String(error),
|
|
210
|
+
isRetryable: false,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
198
213
|
throw error;
|
|
199
214
|
}
|
|
200
215
|
}
|
|
@@ -340,13 +355,25 @@ exports.AccountDecisionRecord = {
|
|
|
340
355
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
341
356
|
continue;
|
|
342
357
|
}
|
|
343
|
-
// Log structured error details and rethrow
|
|
344
|
-
|
|
345
|
-
operation
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
358
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
359
|
+
if (isConnectionError) {
|
|
360
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
361
|
+
operation: 'createManyAccountDecisionRecord',
|
|
362
|
+
model: 'AccountDecisionRecord',
|
|
363
|
+
error: String(error),
|
|
364
|
+
isRetryable: true,
|
|
365
|
+
transient: true,
|
|
366
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
371
|
+
operation: 'createManyAccountDecisionRecord',
|
|
372
|
+
model: 'AccountDecisionRecord',
|
|
373
|
+
error: String(error),
|
|
374
|
+
isRetryable: false,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
350
377
|
throw error;
|
|
351
378
|
}
|
|
352
379
|
}
|
|
@@ -543,14 +570,27 @@ exports.AccountDecisionRecord = {
|
|
|
543
570
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
544
571
|
continue;
|
|
545
572
|
}
|
|
546
|
-
// Log structured error details and rethrow
|
|
547
|
-
|
|
548
|
-
operation
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
573
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
574
|
+
if (isConnectionError) {
|
|
575
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
576
|
+
operation: 'updateOneAccountDecisionRecord',
|
|
577
|
+
model: 'AccountDecisionRecord',
|
|
578
|
+
error: String(error),
|
|
579
|
+
recordId: props.id,
|
|
580
|
+
isRetryable: true,
|
|
581
|
+
transient: true,
|
|
582
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
else {
|
|
586
|
+
logger_1.logger.error("Database update operation failed", {
|
|
587
|
+
operation: 'updateOneAccountDecisionRecord',
|
|
588
|
+
model: 'AccountDecisionRecord',
|
|
589
|
+
error: String(error),
|
|
590
|
+
recordId: props.id,
|
|
591
|
+
isRetryable: false,
|
|
592
|
+
});
|
|
593
|
+
}
|
|
554
594
|
throw error;
|
|
555
595
|
}
|
|
556
596
|
}
|
|
@@ -784,14 +824,27 @@ exports.AccountDecisionRecord = {
|
|
|
784
824
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
785
825
|
continue;
|
|
786
826
|
}
|
|
787
|
-
// Log structured error details and rethrow
|
|
788
|
-
|
|
789
|
-
operation
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
827
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
828
|
+
if (isConnectionError) {
|
|
829
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
830
|
+
operation: 'upsertOneAccountDecisionRecord',
|
|
831
|
+
model: 'AccountDecisionRecord',
|
|
832
|
+
error: String(error),
|
|
833
|
+
recordId: props.id,
|
|
834
|
+
isRetryable: true,
|
|
835
|
+
transient: true,
|
|
836
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
else {
|
|
840
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
841
|
+
operation: 'upsertOneAccountDecisionRecord',
|
|
842
|
+
model: 'AccountDecisionRecord',
|
|
843
|
+
error: String(error),
|
|
844
|
+
recordId: props.id,
|
|
845
|
+
isRetryable: false,
|
|
846
|
+
});
|
|
847
|
+
}
|
|
795
848
|
throw error;
|
|
796
849
|
}
|
|
797
850
|
}
|
|
@@ -986,13 +1039,25 @@ exports.AccountDecisionRecord = {
|
|
|
986
1039
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
987
1040
|
continue;
|
|
988
1041
|
}
|
|
989
|
-
// Log structured error details and rethrow
|
|
990
|
-
|
|
991
|
-
operation
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1042
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1043
|
+
if (isConnectionError) {
|
|
1044
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
1045
|
+
operation: 'updateManyAccountDecisionRecord',
|
|
1046
|
+
model: 'AccountDecisionRecord',
|
|
1047
|
+
error: String(error),
|
|
1048
|
+
isRetryable: true,
|
|
1049
|
+
transient: true,
|
|
1050
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1053
|
+
else {
|
|
1054
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
1055
|
+
operation: 'updateManyAccountDecisionRecord',
|
|
1056
|
+
model: 'AccountDecisionRecord',
|
|
1057
|
+
error: String(error),
|
|
1058
|
+
isRetryable: false,
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
996
1061
|
throw error;
|
|
997
1062
|
}
|
|
998
1063
|
}
|
|
@@ -1115,14 +1180,27 @@ exports.AccountDecisionRecord = {
|
|
|
1115
1180
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1116
1181
|
continue;
|
|
1117
1182
|
}
|
|
1118
|
-
// Log structured error details and rethrow
|
|
1119
|
-
|
|
1120
|
-
operation
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1183
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1184
|
+
if (isConnectionError) {
|
|
1185
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1186
|
+
operation: 'deleteOneAccountDecisionRecord',
|
|
1187
|
+
model: 'AccountDecisionRecord',
|
|
1188
|
+
error: String(error),
|
|
1189
|
+
recordId: props.id,
|
|
1190
|
+
isRetryable: true,
|
|
1191
|
+
transient: true,
|
|
1192
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1193
|
+
});
|
|
1194
|
+
}
|
|
1195
|
+
else {
|
|
1196
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1197
|
+
operation: 'deleteOneAccountDecisionRecord',
|
|
1198
|
+
model: 'AccountDecisionRecord',
|
|
1199
|
+
error: String(error),
|
|
1200
|
+
recordId: props.id,
|
|
1201
|
+
isRetryable: false,
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1126
1204
|
throw error;
|
|
1127
1205
|
}
|
|
1128
1206
|
}
|
|
@@ -1234,13 +1312,25 @@ exports.AccountDecisionRecord = {
|
|
|
1234
1312
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1235
1313
|
continue;
|
|
1236
1314
|
}
|
|
1237
|
-
// Log structured error details and rethrow
|
|
1238
|
-
|
|
1239
|
-
operation
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1315
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1316
|
+
if (isConnectionError) {
|
|
1317
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1318
|
+
operation: 'getAccountDecisionRecord',
|
|
1319
|
+
model: 'AccountDecisionRecord',
|
|
1320
|
+
error: String(error),
|
|
1321
|
+
isRetryable: true,
|
|
1322
|
+
transient: true,
|
|
1323
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1324
|
+
});
|
|
1325
|
+
}
|
|
1326
|
+
else {
|
|
1327
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1328
|
+
operation: 'getAccountDecisionRecord',
|
|
1329
|
+
model: 'AccountDecisionRecord',
|
|
1330
|
+
error: String(error),
|
|
1331
|
+
isRetryable: false,
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1244
1334
|
throw error;
|
|
1245
1335
|
}
|
|
1246
1336
|
}
|
|
@@ -1327,13 +1417,25 @@ exports.AccountDecisionRecord = {
|
|
|
1327
1417
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1328
1418
|
continue;
|
|
1329
1419
|
}
|
|
1330
|
-
// Log structured error details and rethrow
|
|
1331
|
-
|
|
1332
|
-
operation
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1420
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1421
|
+
if (isConnectionError) {
|
|
1422
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1423
|
+
operation: 'getAllAccountDecisionRecord',
|
|
1424
|
+
model: 'AccountDecisionRecord',
|
|
1425
|
+
error: String(error),
|
|
1426
|
+
isRetryable: true,
|
|
1427
|
+
transient: true,
|
|
1428
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
else {
|
|
1432
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1433
|
+
operation: 'getAllAccountDecisionRecord',
|
|
1434
|
+
model: 'AccountDecisionRecord',
|
|
1435
|
+
error: String(error),
|
|
1436
|
+
isRetryable: false,
|
|
1437
|
+
});
|
|
1438
|
+
}
|
|
1337
1439
|
throw error;
|
|
1338
1440
|
}
|
|
1339
1441
|
}
|
|
@@ -1459,13 +1561,25 @@ exports.AccountDecisionRecord = {
|
|
|
1459
1561
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1460
1562
|
continue;
|
|
1461
1563
|
}
|
|
1462
|
-
// Log structured error details and rethrow
|
|
1463
|
-
|
|
1464
|
-
operation
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1564
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1565
|
+
if (isConnectionError) {
|
|
1566
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1567
|
+
operation: 'findManyAccountDecisionRecord',
|
|
1568
|
+
model: 'AccountDecisionRecord',
|
|
1569
|
+
error: String(error),
|
|
1570
|
+
isRetryable: true,
|
|
1571
|
+
transient: true,
|
|
1572
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1573
|
+
});
|
|
1574
|
+
}
|
|
1575
|
+
else {
|
|
1576
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1577
|
+
operation: 'findManyAccountDecisionRecord',
|
|
1578
|
+
model: 'AccountDecisionRecord',
|
|
1579
|
+
error: String(error),
|
|
1580
|
+
isRetryable: false,
|
|
1581
|
+
});
|
|
1582
|
+
}
|
|
1469
1583
|
throw error;
|
|
1470
1584
|
}
|
|
1471
1585
|
}
|
|
@@ -589,13 +589,28 @@ exports.AccountLinkingRequest = {
|
|
|
589
589
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
590
590
|
continue;
|
|
591
591
|
}
|
|
592
|
-
// Log structured error details and rethrow
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
592
|
+
// Log structured error details and rethrow.
|
|
593
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
594
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
595
|
+
// from true defects.
|
|
596
|
+
if (isConnectionError) {
|
|
597
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
598
|
+
operation: 'createOneAccountLinkingRequest',
|
|
599
|
+
model: 'AccountLinkingRequest',
|
|
600
|
+
error: String(error),
|
|
601
|
+
isRetryable: true,
|
|
602
|
+
transient: true,
|
|
603
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
else {
|
|
607
|
+
logger_1.logger.error("Database create operation failed", {
|
|
608
|
+
operation: 'createOneAccountLinkingRequest',
|
|
609
|
+
model: 'AccountLinkingRequest',
|
|
610
|
+
error: String(error),
|
|
611
|
+
isRetryable: false,
|
|
612
|
+
});
|
|
613
|
+
}
|
|
599
614
|
throw error;
|
|
600
615
|
}
|
|
601
616
|
}
|
|
@@ -725,13 +740,25 @@ exports.AccountLinkingRequest = {
|
|
|
725
740
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
726
741
|
continue;
|
|
727
742
|
}
|
|
728
|
-
// Log structured error details and rethrow
|
|
729
|
-
|
|
730
|
-
operation
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
743
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
744
|
+
if (isConnectionError) {
|
|
745
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
746
|
+
operation: 'createManyAccountLinkingRequest',
|
|
747
|
+
model: 'AccountLinkingRequest',
|
|
748
|
+
error: String(error),
|
|
749
|
+
isRetryable: true,
|
|
750
|
+
transient: true,
|
|
751
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
else {
|
|
755
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
756
|
+
operation: 'createManyAccountLinkingRequest',
|
|
757
|
+
model: 'AccountLinkingRequest',
|
|
758
|
+
error: String(error),
|
|
759
|
+
isRetryable: false,
|
|
760
|
+
});
|
|
761
|
+
}
|
|
735
762
|
throw error;
|
|
736
763
|
}
|
|
737
764
|
}
|
|
@@ -2494,14 +2521,27 @@ exports.AccountLinkingRequest = {
|
|
|
2494
2521
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2495
2522
|
continue;
|
|
2496
2523
|
}
|
|
2497
|
-
// Log structured error details and rethrow
|
|
2498
|
-
|
|
2499
|
-
operation
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2524
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2525
|
+
if (isConnectionError) {
|
|
2526
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
2527
|
+
operation: 'updateOneAccountLinkingRequest',
|
|
2528
|
+
model: 'AccountLinkingRequest',
|
|
2529
|
+
error: String(error),
|
|
2530
|
+
recordId: props.id,
|
|
2531
|
+
isRetryable: true,
|
|
2532
|
+
transient: true,
|
|
2533
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2534
|
+
});
|
|
2535
|
+
}
|
|
2536
|
+
else {
|
|
2537
|
+
logger_1.logger.error("Database update operation failed", {
|
|
2538
|
+
operation: 'updateOneAccountLinkingRequest',
|
|
2539
|
+
model: 'AccountLinkingRequest',
|
|
2540
|
+
error: String(error),
|
|
2541
|
+
recordId: props.id,
|
|
2542
|
+
isRetryable: false,
|
|
2543
|
+
});
|
|
2544
|
+
}
|
|
2505
2545
|
throw error;
|
|
2506
2546
|
}
|
|
2507
2547
|
}
|
|
@@ -4718,14 +4758,27 @@ exports.AccountLinkingRequest = {
|
|
|
4718
4758
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4719
4759
|
continue;
|
|
4720
4760
|
}
|
|
4721
|
-
// Log structured error details and rethrow
|
|
4722
|
-
|
|
4723
|
-
operation
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4761
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4762
|
+
if (isConnectionError) {
|
|
4763
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
4764
|
+
operation: 'upsertOneAccountLinkingRequest',
|
|
4765
|
+
model: 'AccountLinkingRequest',
|
|
4766
|
+
error: String(error),
|
|
4767
|
+
recordId: props.id,
|
|
4768
|
+
isRetryable: true,
|
|
4769
|
+
transient: true,
|
|
4770
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4771
|
+
});
|
|
4772
|
+
}
|
|
4773
|
+
else {
|
|
4774
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
4775
|
+
operation: 'upsertOneAccountLinkingRequest',
|
|
4776
|
+
model: 'AccountLinkingRequest',
|
|
4777
|
+
error: String(error),
|
|
4778
|
+
recordId: props.id,
|
|
4779
|
+
isRetryable: false,
|
|
4780
|
+
});
|
|
4781
|
+
}
|
|
4729
4782
|
throw error;
|
|
4730
4783
|
}
|
|
4731
4784
|
}
|
|
@@ -6486,13 +6539,25 @@ exports.AccountLinkingRequest = {
|
|
|
6486
6539
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6487
6540
|
continue;
|
|
6488
6541
|
}
|
|
6489
|
-
// Log structured error details and rethrow
|
|
6490
|
-
|
|
6491
|
-
operation
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6542
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6543
|
+
if (isConnectionError) {
|
|
6544
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
6545
|
+
operation: 'updateManyAccountLinkingRequest',
|
|
6546
|
+
model: 'AccountLinkingRequest',
|
|
6547
|
+
error: String(error),
|
|
6548
|
+
isRetryable: true,
|
|
6549
|
+
transient: true,
|
|
6550
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6551
|
+
});
|
|
6552
|
+
}
|
|
6553
|
+
else {
|
|
6554
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
6555
|
+
operation: 'updateManyAccountLinkingRequest',
|
|
6556
|
+
model: 'AccountLinkingRequest',
|
|
6557
|
+
error: String(error),
|
|
6558
|
+
isRetryable: false,
|
|
6559
|
+
});
|
|
6560
|
+
}
|
|
6496
6561
|
throw error;
|
|
6497
6562
|
}
|
|
6498
6563
|
}
|
|
@@ -6615,14 +6680,27 @@ exports.AccountLinkingRequest = {
|
|
|
6615
6680
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6616
6681
|
continue;
|
|
6617
6682
|
}
|
|
6618
|
-
// Log structured error details and rethrow
|
|
6619
|
-
|
|
6620
|
-
operation
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6683
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6684
|
+
if (isConnectionError) {
|
|
6685
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
6686
|
+
operation: 'deleteOneAccountLinkingRequest',
|
|
6687
|
+
model: 'AccountLinkingRequest',
|
|
6688
|
+
error: String(error),
|
|
6689
|
+
recordId: props.id,
|
|
6690
|
+
isRetryable: true,
|
|
6691
|
+
transient: true,
|
|
6692
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6693
|
+
});
|
|
6694
|
+
}
|
|
6695
|
+
else {
|
|
6696
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
6697
|
+
operation: 'deleteOneAccountLinkingRequest',
|
|
6698
|
+
model: 'AccountLinkingRequest',
|
|
6699
|
+
error: String(error),
|
|
6700
|
+
recordId: props.id,
|
|
6701
|
+
isRetryable: false,
|
|
6702
|
+
});
|
|
6703
|
+
}
|
|
6626
6704
|
throw error;
|
|
6627
6705
|
}
|
|
6628
6706
|
}
|
|
@@ -6730,13 +6808,25 @@ exports.AccountLinkingRequest = {
|
|
|
6730
6808
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6731
6809
|
continue;
|
|
6732
6810
|
}
|
|
6733
|
-
// Log structured error details and rethrow
|
|
6734
|
-
|
|
6735
|
-
operation
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6811
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6812
|
+
if (isConnectionError) {
|
|
6813
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
6814
|
+
operation: 'getAccountLinkingRequest',
|
|
6815
|
+
model: 'AccountLinkingRequest',
|
|
6816
|
+
error: String(error),
|
|
6817
|
+
isRetryable: true,
|
|
6818
|
+
transient: true,
|
|
6819
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6820
|
+
});
|
|
6821
|
+
}
|
|
6822
|
+
else {
|
|
6823
|
+
logger_1.logger.error("Database get operation failed", {
|
|
6824
|
+
operation: 'getAccountLinkingRequest',
|
|
6825
|
+
model: 'AccountLinkingRequest',
|
|
6826
|
+
error: String(error),
|
|
6827
|
+
isRetryable: false,
|
|
6828
|
+
});
|
|
6829
|
+
}
|
|
6740
6830
|
throw error;
|
|
6741
6831
|
}
|
|
6742
6832
|
}
|
|
@@ -6823,13 +6913,25 @@ exports.AccountLinkingRequest = {
|
|
|
6823
6913
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6824
6914
|
continue;
|
|
6825
6915
|
}
|
|
6826
|
-
// Log structured error details and rethrow
|
|
6827
|
-
|
|
6828
|
-
operation
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6916
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6917
|
+
if (isConnectionError) {
|
|
6918
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
6919
|
+
operation: 'getAllAccountLinkingRequest',
|
|
6920
|
+
model: 'AccountLinkingRequest',
|
|
6921
|
+
error: String(error),
|
|
6922
|
+
isRetryable: true,
|
|
6923
|
+
transient: true,
|
|
6924
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6925
|
+
});
|
|
6926
|
+
}
|
|
6927
|
+
else {
|
|
6928
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
6929
|
+
operation: 'getAllAccountLinkingRequest',
|
|
6930
|
+
model: 'AccountLinkingRequest',
|
|
6931
|
+
error: String(error),
|
|
6932
|
+
isRetryable: false,
|
|
6933
|
+
});
|
|
6934
|
+
}
|
|
6833
6935
|
throw error;
|
|
6834
6936
|
}
|
|
6835
6937
|
}
|
|
@@ -6949,13 +7051,25 @@ exports.AccountLinkingRequest = {
|
|
|
6949
7051
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6950
7052
|
continue;
|
|
6951
7053
|
}
|
|
6952
|
-
// Log structured error details and rethrow
|
|
6953
|
-
|
|
6954
|
-
operation
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
7054
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7055
|
+
if (isConnectionError) {
|
|
7056
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
7057
|
+
operation: 'findManyAccountLinkingRequest',
|
|
7058
|
+
model: 'AccountLinkingRequest',
|
|
7059
|
+
error: String(error),
|
|
7060
|
+
isRetryable: true,
|
|
7061
|
+
transient: true,
|
|
7062
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7063
|
+
});
|
|
7064
|
+
}
|
|
7065
|
+
else {
|
|
7066
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
7067
|
+
operation: 'findManyAccountLinkingRequest',
|
|
7068
|
+
model: 'AccountLinkingRequest',
|
|
7069
|
+
error: String(error),
|
|
7070
|
+
isRetryable: false,
|
|
7071
|
+
});
|
|
7072
|
+
}
|
|
6959
7073
|
throw error;
|
|
6960
7074
|
}
|
|
6961
7075
|
}
|