@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
|
@@ -150,13 +150,28 @@ exports.InstitutionalSentimentAlerts = {
|
|
|
150
150
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
151
151
|
continue;
|
|
152
152
|
}
|
|
153
|
-
// Log structured error details and rethrow
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
153
|
+
// Log structured error details and rethrow.
|
|
154
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
155
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
156
|
+
// from true defects.
|
|
157
|
+
if (isConnectionError) {
|
|
158
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
159
|
+
operation: 'createOneInstitutionalSentimentAlerts',
|
|
160
|
+
model: 'InstitutionalSentimentAlerts',
|
|
161
|
+
error: String(error),
|
|
162
|
+
isRetryable: true,
|
|
163
|
+
transient: true,
|
|
164
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
logger_1.logger.error("Database create operation failed", {
|
|
169
|
+
operation: 'createOneInstitutionalSentimentAlerts',
|
|
170
|
+
model: 'InstitutionalSentimentAlerts',
|
|
171
|
+
error: String(error),
|
|
172
|
+
isRetryable: false,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
160
175
|
throw error;
|
|
161
176
|
}
|
|
162
177
|
}
|
|
@@ -283,13 +298,25 @@ exports.InstitutionalSentimentAlerts = {
|
|
|
283
298
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
284
299
|
continue;
|
|
285
300
|
}
|
|
286
|
-
// Log structured error details and rethrow
|
|
287
|
-
|
|
288
|
-
operation
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
301
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
302
|
+
if (isConnectionError) {
|
|
303
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
304
|
+
operation: 'createManyInstitutionalSentimentAlerts',
|
|
305
|
+
model: 'InstitutionalSentimentAlerts',
|
|
306
|
+
error: String(error),
|
|
307
|
+
isRetryable: true,
|
|
308
|
+
transient: true,
|
|
309
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
314
|
+
operation: 'createManyInstitutionalSentimentAlerts',
|
|
315
|
+
model: 'InstitutionalSentimentAlerts',
|
|
316
|
+
error: String(error),
|
|
317
|
+
isRetryable: false,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
293
320
|
throw error;
|
|
294
321
|
}
|
|
295
322
|
}
|
|
@@ -447,14 +474,27 @@ exports.InstitutionalSentimentAlerts = {
|
|
|
447
474
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
448
475
|
continue;
|
|
449
476
|
}
|
|
450
|
-
// Log structured error details and rethrow
|
|
451
|
-
|
|
452
|
-
operation
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
477
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
478
|
+
if (isConnectionError) {
|
|
479
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
480
|
+
operation: 'updateOneInstitutionalSentimentAlerts',
|
|
481
|
+
model: 'InstitutionalSentimentAlerts',
|
|
482
|
+
error: String(error),
|
|
483
|
+
recordId: props.id,
|
|
484
|
+
isRetryable: true,
|
|
485
|
+
transient: true,
|
|
486
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
logger_1.logger.error("Database update operation failed", {
|
|
491
|
+
operation: 'updateOneInstitutionalSentimentAlerts',
|
|
492
|
+
model: 'InstitutionalSentimentAlerts',
|
|
493
|
+
error: String(error),
|
|
494
|
+
recordId: props.id,
|
|
495
|
+
isRetryable: false,
|
|
496
|
+
});
|
|
497
|
+
}
|
|
458
498
|
throw error;
|
|
459
499
|
}
|
|
460
500
|
}
|
|
@@ -617,14 +657,27 @@ exports.InstitutionalSentimentAlerts = {
|
|
|
617
657
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
618
658
|
continue;
|
|
619
659
|
}
|
|
620
|
-
// Log structured error details and rethrow
|
|
621
|
-
|
|
622
|
-
operation
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
660
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
661
|
+
if (isConnectionError) {
|
|
662
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
663
|
+
operation: 'upsertOneInstitutionalSentimentAlerts',
|
|
664
|
+
model: 'InstitutionalSentimentAlerts',
|
|
665
|
+
error: String(error),
|
|
666
|
+
recordId: props.id,
|
|
667
|
+
isRetryable: true,
|
|
668
|
+
transient: true,
|
|
669
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
674
|
+
operation: 'upsertOneInstitutionalSentimentAlerts',
|
|
675
|
+
model: 'InstitutionalSentimentAlerts',
|
|
676
|
+
error: String(error),
|
|
677
|
+
recordId: props.id,
|
|
678
|
+
isRetryable: false,
|
|
679
|
+
});
|
|
680
|
+
}
|
|
628
681
|
throw error;
|
|
629
682
|
}
|
|
630
683
|
}
|
|
@@ -780,13 +833,25 @@ exports.InstitutionalSentimentAlerts = {
|
|
|
780
833
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
781
834
|
continue;
|
|
782
835
|
}
|
|
783
|
-
// Log structured error details and rethrow
|
|
784
|
-
|
|
785
|
-
operation
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
836
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
837
|
+
if (isConnectionError) {
|
|
838
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
839
|
+
operation: 'updateManyInstitutionalSentimentAlerts',
|
|
840
|
+
model: 'InstitutionalSentimentAlerts',
|
|
841
|
+
error: String(error),
|
|
842
|
+
isRetryable: true,
|
|
843
|
+
transient: true,
|
|
844
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
else {
|
|
848
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
849
|
+
operation: 'updateManyInstitutionalSentimentAlerts',
|
|
850
|
+
model: 'InstitutionalSentimentAlerts',
|
|
851
|
+
error: String(error),
|
|
852
|
+
isRetryable: false,
|
|
853
|
+
});
|
|
854
|
+
}
|
|
790
855
|
throw error;
|
|
791
856
|
}
|
|
792
857
|
}
|
|
@@ -909,14 +974,27 @@ exports.InstitutionalSentimentAlerts = {
|
|
|
909
974
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
910
975
|
continue;
|
|
911
976
|
}
|
|
912
|
-
// Log structured error details and rethrow
|
|
913
|
-
|
|
914
|
-
operation
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
977
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
978
|
+
if (isConnectionError) {
|
|
979
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
980
|
+
operation: 'deleteOneInstitutionalSentimentAlerts',
|
|
981
|
+
model: 'InstitutionalSentimentAlerts',
|
|
982
|
+
error: String(error),
|
|
983
|
+
recordId: props.id,
|
|
984
|
+
isRetryable: true,
|
|
985
|
+
transient: true,
|
|
986
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
else {
|
|
990
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
991
|
+
operation: 'deleteOneInstitutionalSentimentAlerts',
|
|
992
|
+
model: 'InstitutionalSentimentAlerts',
|
|
993
|
+
error: String(error),
|
|
994
|
+
recordId: props.id,
|
|
995
|
+
isRetryable: false,
|
|
996
|
+
});
|
|
997
|
+
}
|
|
920
998
|
throw error;
|
|
921
999
|
}
|
|
922
1000
|
}
|
|
@@ -1015,13 +1093,25 @@ exports.InstitutionalSentimentAlerts = {
|
|
|
1015
1093
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1016
1094
|
continue;
|
|
1017
1095
|
}
|
|
1018
|
-
// Log structured error details and rethrow
|
|
1019
|
-
|
|
1020
|
-
operation
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1096
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1097
|
+
if (isConnectionError) {
|
|
1098
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1099
|
+
operation: 'getInstitutionalSentimentAlerts',
|
|
1100
|
+
model: 'InstitutionalSentimentAlerts',
|
|
1101
|
+
error: String(error),
|
|
1102
|
+
isRetryable: true,
|
|
1103
|
+
transient: true,
|
|
1104
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1105
|
+
});
|
|
1106
|
+
}
|
|
1107
|
+
else {
|
|
1108
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1109
|
+
operation: 'getInstitutionalSentimentAlerts',
|
|
1110
|
+
model: 'InstitutionalSentimentAlerts',
|
|
1111
|
+
error: String(error),
|
|
1112
|
+
isRetryable: false,
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1025
1115
|
throw error;
|
|
1026
1116
|
}
|
|
1027
1117
|
}
|
|
@@ -1108,13 +1198,25 @@ exports.InstitutionalSentimentAlerts = {
|
|
|
1108
1198
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1109
1199
|
continue;
|
|
1110
1200
|
}
|
|
1111
|
-
// Log structured error details and rethrow
|
|
1112
|
-
|
|
1113
|
-
operation
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1201
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1202
|
+
if (isConnectionError) {
|
|
1203
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1204
|
+
operation: 'getAllInstitutionalSentimentAlerts',
|
|
1205
|
+
model: 'InstitutionalSentimentAlerts',
|
|
1206
|
+
error: String(error),
|
|
1207
|
+
isRetryable: true,
|
|
1208
|
+
transient: true,
|
|
1209
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1210
|
+
});
|
|
1211
|
+
}
|
|
1212
|
+
else {
|
|
1213
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1214
|
+
operation: 'getAllInstitutionalSentimentAlerts',
|
|
1215
|
+
model: 'InstitutionalSentimentAlerts',
|
|
1216
|
+
error: String(error),
|
|
1217
|
+
isRetryable: false,
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1118
1220
|
throw error;
|
|
1119
1221
|
}
|
|
1120
1222
|
}
|
|
@@ -1225,13 +1327,25 @@ exports.InstitutionalSentimentAlerts = {
|
|
|
1225
1327
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1226
1328
|
continue;
|
|
1227
1329
|
}
|
|
1228
|
-
// Log structured error details and rethrow
|
|
1229
|
-
|
|
1230
|
-
operation
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1330
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1331
|
+
if (isConnectionError) {
|
|
1332
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1333
|
+
operation: 'findManyInstitutionalSentimentAlerts',
|
|
1334
|
+
model: 'InstitutionalSentimentAlerts',
|
|
1335
|
+
error: String(error),
|
|
1336
|
+
isRetryable: true,
|
|
1337
|
+
transient: true,
|
|
1338
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1341
|
+
else {
|
|
1342
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1343
|
+
operation: 'findManyInstitutionalSentimentAlerts',
|
|
1344
|
+
model: 'InstitutionalSentimentAlerts',
|
|
1345
|
+
error: String(error),
|
|
1346
|
+
isRetryable: false,
|
|
1347
|
+
});
|
|
1348
|
+
}
|
|
1235
1349
|
throw error;
|
|
1236
1350
|
}
|
|
1237
1351
|
}
|
|
@@ -141,13 +141,28 @@ exports.InstitutionalSentimentErrors = {
|
|
|
141
141
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
142
142
|
continue;
|
|
143
143
|
}
|
|
144
|
-
// Log structured error details and rethrow
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
144
|
+
// Log structured error details and rethrow.
|
|
145
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
146
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
147
|
+
// from true defects.
|
|
148
|
+
if (isConnectionError) {
|
|
149
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
150
|
+
operation: 'createOneInstitutionalSentimentErrors',
|
|
151
|
+
model: 'InstitutionalSentimentErrors',
|
|
152
|
+
error: String(error),
|
|
153
|
+
isRetryable: true,
|
|
154
|
+
transient: true,
|
|
155
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
logger_1.logger.error("Database create operation failed", {
|
|
160
|
+
operation: 'createOneInstitutionalSentimentErrors',
|
|
161
|
+
model: 'InstitutionalSentimentErrors',
|
|
162
|
+
error: String(error),
|
|
163
|
+
isRetryable: false,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
151
166
|
throw error;
|
|
152
167
|
}
|
|
153
168
|
}
|
|
@@ -270,13 +285,25 @@ exports.InstitutionalSentimentErrors = {
|
|
|
270
285
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
271
286
|
continue;
|
|
272
287
|
}
|
|
273
|
-
// Log structured error details and rethrow
|
|
274
|
-
|
|
275
|
-
operation
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
288
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
289
|
+
if (isConnectionError) {
|
|
290
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
291
|
+
operation: 'createManyInstitutionalSentimentErrors',
|
|
292
|
+
model: 'InstitutionalSentimentErrors',
|
|
293
|
+
error: String(error),
|
|
294
|
+
isRetryable: true,
|
|
295
|
+
transient: true,
|
|
296
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
301
|
+
operation: 'createManyInstitutionalSentimentErrors',
|
|
302
|
+
model: 'InstitutionalSentimentErrors',
|
|
303
|
+
error: String(error),
|
|
304
|
+
isRetryable: false,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
280
307
|
throw error;
|
|
281
308
|
}
|
|
282
309
|
}
|
|
@@ -419,14 +446,27 @@ exports.InstitutionalSentimentErrors = {
|
|
|
419
446
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
420
447
|
continue;
|
|
421
448
|
}
|
|
422
|
-
// Log structured error details and rethrow
|
|
423
|
-
|
|
424
|
-
operation
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
449
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
450
|
+
if (isConnectionError) {
|
|
451
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
452
|
+
operation: 'updateOneInstitutionalSentimentErrors',
|
|
453
|
+
model: 'InstitutionalSentimentErrors',
|
|
454
|
+
error: String(error),
|
|
455
|
+
recordId: props.id,
|
|
456
|
+
isRetryable: true,
|
|
457
|
+
transient: true,
|
|
458
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
logger_1.logger.error("Database update operation failed", {
|
|
463
|
+
operation: 'updateOneInstitutionalSentimentErrors',
|
|
464
|
+
model: 'InstitutionalSentimentErrors',
|
|
465
|
+
error: String(error),
|
|
466
|
+
recordId: props.id,
|
|
467
|
+
isRetryable: false,
|
|
468
|
+
});
|
|
469
|
+
}
|
|
430
470
|
throw error;
|
|
431
471
|
}
|
|
432
472
|
}
|
|
@@ -570,14 +610,27 @@ exports.InstitutionalSentimentErrors = {
|
|
|
570
610
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
571
611
|
continue;
|
|
572
612
|
}
|
|
573
|
-
// Log structured error details and rethrow
|
|
574
|
-
|
|
575
|
-
operation
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
613
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
614
|
+
if (isConnectionError) {
|
|
615
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
616
|
+
operation: 'upsertOneInstitutionalSentimentErrors',
|
|
617
|
+
model: 'InstitutionalSentimentErrors',
|
|
618
|
+
error: String(error),
|
|
619
|
+
recordId: props.id,
|
|
620
|
+
isRetryable: true,
|
|
621
|
+
transient: true,
|
|
622
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
else {
|
|
626
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
627
|
+
operation: 'upsertOneInstitutionalSentimentErrors',
|
|
628
|
+
model: 'InstitutionalSentimentErrors',
|
|
629
|
+
error: String(error),
|
|
630
|
+
recordId: props.id,
|
|
631
|
+
isRetryable: false,
|
|
632
|
+
});
|
|
633
|
+
}
|
|
581
634
|
throw error;
|
|
582
635
|
}
|
|
583
636
|
}
|
|
@@ -718,13 +771,25 @@ exports.InstitutionalSentimentErrors = {
|
|
|
718
771
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
719
772
|
continue;
|
|
720
773
|
}
|
|
721
|
-
// Log structured error details and rethrow
|
|
722
|
-
|
|
723
|
-
operation
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
774
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
775
|
+
if (isConnectionError) {
|
|
776
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
777
|
+
operation: 'updateManyInstitutionalSentimentErrors',
|
|
778
|
+
model: 'InstitutionalSentimentErrors',
|
|
779
|
+
error: String(error),
|
|
780
|
+
isRetryable: true,
|
|
781
|
+
transient: true,
|
|
782
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
else {
|
|
786
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
787
|
+
operation: 'updateManyInstitutionalSentimentErrors',
|
|
788
|
+
model: 'InstitutionalSentimentErrors',
|
|
789
|
+
error: String(error),
|
|
790
|
+
isRetryable: false,
|
|
791
|
+
});
|
|
792
|
+
}
|
|
728
793
|
throw error;
|
|
729
794
|
}
|
|
730
795
|
}
|
|
@@ -847,14 +912,27 @@ exports.InstitutionalSentimentErrors = {
|
|
|
847
912
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
848
913
|
continue;
|
|
849
914
|
}
|
|
850
|
-
// Log structured error details and rethrow
|
|
851
|
-
|
|
852
|
-
operation
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
915
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
916
|
+
if (isConnectionError) {
|
|
917
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
918
|
+
operation: 'deleteOneInstitutionalSentimentErrors',
|
|
919
|
+
model: 'InstitutionalSentimentErrors',
|
|
920
|
+
error: String(error),
|
|
921
|
+
recordId: props.id,
|
|
922
|
+
isRetryable: true,
|
|
923
|
+
transient: true,
|
|
924
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
else {
|
|
928
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
929
|
+
operation: 'deleteOneInstitutionalSentimentErrors',
|
|
930
|
+
model: 'InstitutionalSentimentErrors',
|
|
931
|
+
error: String(error),
|
|
932
|
+
recordId: props.id,
|
|
933
|
+
isRetryable: false,
|
|
934
|
+
});
|
|
935
|
+
}
|
|
858
936
|
throw error;
|
|
859
937
|
}
|
|
860
938
|
}
|
|
@@ -950,13 +1028,25 @@ exports.InstitutionalSentimentErrors = {
|
|
|
950
1028
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
951
1029
|
continue;
|
|
952
1030
|
}
|
|
953
|
-
// Log structured error details and rethrow
|
|
954
|
-
|
|
955
|
-
operation
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1031
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1032
|
+
if (isConnectionError) {
|
|
1033
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1034
|
+
operation: 'getInstitutionalSentimentErrors',
|
|
1035
|
+
model: 'InstitutionalSentimentErrors',
|
|
1036
|
+
error: String(error),
|
|
1037
|
+
isRetryable: true,
|
|
1038
|
+
transient: true,
|
|
1039
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
else {
|
|
1043
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1044
|
+
operation: 'getInstitutionalSentimentErrors',
|
|
1045
|
+
model: 'InstitutionalSentimentErrors',
|
|
1046
|
+
error: String(error),
|
|
1047
|
+
isRetryable: false,
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
960
1050
|
throw error;
|
|
961
1051
|
}
|
|
962
1052
|
}
|
|
@@ -1043,13 +1133,25 @@ exports.InstitutionalSentimentErrors = {
|
|
|
1043
1133
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1044
1134
|
continue;
|
|
1045
1135
|
}
|
|
1046
|
-
// Log structured error details and rethrow
|
|
1047
|
-
|
|
1048
|
-
operation
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1136
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1137
|
+
if (isConnectionError) {
|
|
1138
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1139
|
+
operation: 'getAllInstitutionalSentimentErrors',
|
|
1140
|
+
model: 'InstitutionalSentimentErrors',
|
|
1141
|
+
error: String(error),
|
|
1142
|
+
isRetryable: true,
|
|
1143
|
+
transient: true,
|
|
1144
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
else {
|
|
1148
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1149
|
+
operation: 'getAllInstitutionalSentimentErrors',
|
|
1150
|
+
model: 'InstitutionalSentimentErrors',
|
|
1151
|
+
error: String(error),
|
|
1152
|
+
isRetryable: false,
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1053
1155
|
throw error;
|
|
1054
1156
|
}
|
|
1055
1157
|
}
|
|
@@ -1157,13 +1259,25 @@ exports.InstitutionalSentimentErrors = {
|
|
|
1157
1259
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1158
1260
|
continue;
|
|
1159
1261
|
}
|
|
1160
|
-
// Log structured error details and rethrow
|
|
1161
|
-
|
|
1162
|
-
operation
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1262
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1263
|
+
if (isConnectionError) {
|
|
1264
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1265
|
+
operation: 'findManyInstitutionalSentimentErrors',
|
|
1266
|
+
model: 'InstitutionalSentimentErrors',
|
|
1267
|
+
error: String(error),
|
|
1268
|
+
isRetryable: true,
|
|
1269
|
+
transient: true,
|
|
1270
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1273
|
+
else {
|
|
1274
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1275
|
+
operation: 'findManyInstitutionalSentimentErrors',
|
|
1276
|
+
model: 'InstitutionalSentimentErrors',
|
|
1277
|
+
error: String(error),
|
|
1278
|
+
isRetryable: false,
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1167
1281
|
throw error;
|
|
1168
1282
|
}
|
|
1169
1283
|
}
|