@adaptic/backend-legacy 0.0.960 → 0.0.962
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/client.cjs +131 -9
- package/client.d.ts +32 -0
- 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/client.d.ts +32 -0
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js.map +1 -1
- package/esm/client.mjs +130 -9
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/index.mjs +1 -1
- package/index.cjs +2 -1
- package/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -220,13 +220,28 @@ exports.InstitutionalSentimentHistory = {
|
|
|
220
220
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
221
221
|
continue;
|
|
222
222
|
}
|
|
223
|
-
// Log structured error details and rethrow
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
223
|
+
// Log structured error details and rethrow.
|
|
224
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
225
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
226
|
+
// from true defects.
|
|
227
|
+
if (isConnectionError) {
|
|
228
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
229
|
+
operation: 'createOneInstitutionalSentimentHistory',
|
|
230
|
+
model: 'InstitutionalSentimentHistory',
|
|
231
|
+
error: String(error),
|
|
232
|
+
isRetryable: true,
|
|
233
|
+
transient: true,
|
|
234
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
logger_1.logger.error("Database create operation failed", {
|
|
239
|
+
operation: 'createOneInstitutionalSentimentHistory',
|
|
240
|
+
model: 'InstitutionalSentimentHistory',
|
|
241
|
+
error: String(error),
|
|
242
|
+
isRetryable: false,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
230
245
|
throw error;
|
|
231
246
|
}
|
|
232
247
|
}
|
|
@@ -388,13 +403,25 @@ exports.InstitutionalSentimentHistory = {
|
|
|
388
403
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
389
404
|
continue;
|
|
390
405
|
}
|
|
391
|
-
// Log structured error details and rethrow
|
|
392
|
-
|
|
393
|
-
operation
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
406
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
407
|
+
if (isConnectionError) {
|
|
408
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
409
|
+
operation: 'createManyInstitutionalSentimentHistory',
|
|
410
|
+
model: 'InstitutionalSentimentHistory',
|
|
411
|
+
error: String(error),
|
|
412
|
+
isRetryable: true,
|
|
413
|
+
transient: true,
|
|
414
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
419
|
+
operation: 'createManyInstitutionalSentimentHistory',
|
|
420
|
+
model: 'InstitutionalSentimentHistory',
|
|
421
|
+
error: String(error),
|
|
422
|
+
isRetryable: false,
|
|
423
|
+
});
|
|
424
|
+
}
|
|
398
425
|
throw error;
|
|
399
426
|
}
|
|
400
427
|
}
|
|
@@ -657,14 +684,27 @@ exports.InstitutionalSentimentHistory = {
|
|
|
657
684
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
658
685
|
continue;
|
|
659
686
|
}
|
|
660
|
-
// Log structured error details and rethrow
|
|
661
|
-
|
|
662
|
-
operation
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
687
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
688
|
+
if (isConnectionError) {
|
|
689
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
690
|
+
operation: 'updateOneInstitutionalSentimentHistory',
|
|
691
|
+
model: 'InstitutionalSentimentHistory',
|
|
692
|
+
error: String(error),
|
|
693
|
+
recordId: props.id,
|
|
694
|
+
isRetryable: true,
|
|
695
|
+
transient: true,
|
|
696
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
logger_1.logger.error("Database update operation failed", {
|
|
701
|
+
operation: 'updateOneInstitutionalSentimentHistory',
|
|
702
|
+
model: 'InstitutionalSentimentHistory',
|
|
703
|
+
error: String(error),
|
|
704
|
+
recordId: props.id,
|
|
705
|
+
isRetryable: false,
|
|
706
|
+
});
|
|
707
|
+
}
|
|
668
708
|
throw error;
|
|
669
709
|
}
|
|
670
710
|
}
|
|
@@ -967,14 +1007,27 @@ exports.InstitutionalSentimentHistory = {
|
|
|
967
1007
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
968
1008
|
continue;
|
|
969
1009
|
}
|
|
970
|
-
// Log structured error details and rethrow
|
|
971
|
-
|
|
972
|
-
operation
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1010
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1011
|
+
if (isConnectionError) {
|
|
1012
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
1013
|
+
operation: 'upsertOneInstitutionalSentimentHistory',
|
|
1014
|
+
model: 'InstitutionalSentimentHistory',
|
|
1015
|
+
error: String(error),
|
|
1016
|
+
recordId: props.id,
|
|
1017
|
+
isRetryable: true,
|
|
1018
|
+
transient: true,
|
|
1019
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
else {
|
|
1023
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
1024
|
+
operation: 'upsertOneInstitutionalSentimentHistory',
|
|
1025
|
+
model: 'InstitutionalSentimentHistory',
|
|
1026
|
+
error: String(error),
|
|
1027
|
+
recordId: props.id,
|
|
1028
|
+
isRetryable: false,
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
978
1031
|
throw error;
|
|
979
1032
|
}
|
|
980
1033
|
}
|
|
@@ -1235,13 +1288,25 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1235
1288
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1236
1289
|
continue;
|
|
1237
1290
|
}
|
|
1238
|
-
// Log structured error details and rethrow
|
|
1239
|
-
|
|
1240
|
-
operation
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1291
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1292
|
+
if (isConnectionError) {
|
|
1293
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
1294
|
+
operation: 'updateManyInstitutionalSentimentHistory',
|
|
1295
|
+
model: 'InstitutionalSentimentHistory',
|
|
1296
|
+
error: String(error),
|
|
1297
|
+
isRetryable: true,
|
|
1298
|
+
transient: true,
|
|
1299
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1300
|
+
});
|
|
1301
|
+
}
|
|
1302
|
+
else {
|
|
1303
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
1304
|
+
operation: 'updateManyInstitutionalSentimentHistory',
|
|
1305
|
+
model: 'InstitutionalSentimentHistory',
|
|
1306
|
+
error: String(error),
|
|
1307
|
+
isRetryable: false,
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1245
1310
|
throw error;
|
|
1246
1311
|
}
|
|
1247
1312
|
}
|
|
@@ -1364,14 +1429,27 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1364
1429
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1365
1430
|
continue;
|
|
1366
1431
|
}
|
|
1367
|
-
// Log structured error details and rethrow
|
|
1368
|
-
|
|
1369
|
-
operation
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1432
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1433
|
+
if (isConnectionError) {
|
|
1434
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1435
|
+
operation: 'deleteOneInstitutionalSentimentHistory',
|
|
1436
|
+
model: 'InstitutionalSentimentHistory',
|
|
1437
|
+
error: String(error),
|
|
1438
|
+
recordId: props.id,
|
|
1439
|
+
isRetryable: true,
|
|
1440
|
+
transient: true,
|
|
1441
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
else {
|
|
1445
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1446
|
+
operation: 'deleteOneInstitutionalSentimentHistory',
|
|
1447
|
+
model: 'InstitutionalSentimentHistory',
|
|
1448
|
+
error: String(error),
|
|
1449
|
+
recordId: props.id,
|
|
1450
|
+
isRetryable: false,
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1375
1453
|
throw error;
|
|
1376
1454
|
}
|
|
1377
1455
|
}
|
|
@@ -1470,13 +1548,25 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1470
1548
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1471
1549
|
continue;
|
|
1472
1550
|
}
|
|
1473
|
-
// Log structured error details and rethrow
|
|
1474
|
-
|
|
1475
|
-
operation
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1551
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1552
|
+
if (isConnectionError) {
|
|
1553
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1554
|
+
operation: 'getInstitutionalSentimentHistory',
|
|
1555
|
+
model: 'InstitutionalSentimentHistory',
|
|
1556
|
+
error: String(error),
|
|
1557
|
+
isRetryable: true,
|
|
1558
|
+
transient: true,
|
|
1559
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
else {
|
|
1563
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1564
|
+
operation: 'getInstitutionalSentimentHistory',
|
|
1565
|
+
model: 'InstitutionalSentimentHistory',
|
|
1566
|
+
error: String(error),
|
|
1567
|
+
isRetryable: false,
|
|
1568
|
+
});
|
|
1569
|
+
}
|
|
1480
1570
|
throw error;
|
|
1481
1571
|
}
|
|
1482
1572
|
}
|
|
@@ -1563,13 +1653,25 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1563
1653
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1564
1654
|
continue;
|
|
1565
1655
|
}
|
|
1566
|
-
// Log structured error details and rethrow
|
|
1567
|
-
|
|
1568
|
-
operation
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1656
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1657
|
+
if (isConnectionError) {
|
|
1658
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1659
|
+
operation: 'getAllInstitutionalSentimentHistory',
|
|
1660
|
+
model: 'InstitutionalSentimentHistory',
|
|
1661
|
+
error: String(error),
|
|
1662
|
+
isRetryable: true,
|
|
1663
|
+
transient: true,
|
|
1664
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1665
|
+
});
|
|
1666
|
+
}
|
|
1667
|
+
else {
|
|
1668
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1669
|
+
operation: 'getAllInstitutionalSentimentHistory',
|
|
1670
|
+
model: 'InstitutionalSentimentHistory',
|
|
1671
|
+
error: String(error),
|
|
1672
|
+
isRetryable: false,
|
|
1673
|
+
});
|
|
1674
|
+
}
|
|
1573
1675
|
throw error;
|
|
1574
1676
|
}
|
|
1575
1677
|
}
|
|
@@ -1680,13 +1782,25 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1680
1782
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1681
1783
|
continue;
|
|
1682
1784
|
}
|
|
1683
|
-
// Log structured error details and rethrow
|
|
1684
|
-
|
|
1685
|
-
operation
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1785
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1786
|
+
if (isConnectionError) {
|
|
1787
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1788
|
+
operation: 'findManyInstitutionalSentimentHistory',
|
|
1789
|
+
model: 'InstitutionalSentimentHistory',
|
|
1790
|
+
error: String(error),
|
|
1791
|
+
isRetryable: true,
|
|
1792
|
+
transient: true,
|
|
1793
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1794
|
+
});
|
|
1795
|
+
}
|
|
1796
|
+
else {
|
|
1797
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1798
|
+
operation: 'findManyInstitutionalSentimentHistory',
|
|
1799
|
+
model: 'InstitutionalSentimentHistory',
|
|
1800
|
+
error: String(error),
|
|
1801
|
+
isRetryable: false,
|
|
1802
|
+
});
|
|
1803
|
+
}
|
|
1690
1804
|
throw error;
|
|
1691
1805
|
}
|
|
1692
1806
|
}
|
|
@@ -145,13 +145,28 @@ exports.InstitutionalSentimentMetrics = {
|
|
|
145
145
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
146
146
|
continue;
|
|
147
147
|
}
|
|
148
|
-
// Log structured error details and rethrow
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
148
|
+
// Log structured error details and rethrow.
|
|
149
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
150
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
151
|
+
// from true defects.
|
|
152
|
+
if (isConnectionError) {
|
|
153
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
154
|
+
operation: 'createOneInstitutionalSentimentMetrics',
|
|
155
|
+
model: 'InstitutionalSentimentMetrics',
|
|
156
|
+
error: String(error),
|
|
157
|
+
isRetryable: true,
|
|
158
|
+
transient: true,
|
|
159
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
logger_1.logger.error("Database create operation failed", {
|
|
164
|
+
operation: 'createOneInstitutionalSentimentMetrics',
|
|
165
|
+
model: 'InstitutionalSentimentMetrics',
|
|
166
|
+
error: String(error),
|
|
167
|
+
isRetryable: false,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
155
170
|
throw error;
|
|
156
171
|
}
|
|
157
172
|
}
|
|
@@ -276,13 +291,25 @@ exports.InstitutionalSentimentMetrics = {
|
|
|
276
291
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
277
292
|
continue;
|
|
278
293
|
}
|
|
279
|
-
// Log structured error details and rethrow
|
|
280
|
-
|
|
281
|
-
operation
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
294
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
295
|
+
if (isConnectionError) {
|
|
296
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
297
|
+
operation: 'createManyInstitutionalSentimentMetrics',
|
|
298
|
+
model: 'InstitutionalSentimentMetrics',
|
|
299
|
+
error: String(error),
|
|
300
|
+
isRetryable: true,
|
|
301
|
+
transient: true,
|
|
302
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
307
|
+
operation: 'createManyInstitutionalSentimentMetrics',
|
|
308
|
+
model: 'InstitutionalSentimentMetrics',
|
|
309
|
+
error: String(error),
|
|
310
|
+
isRetryable: false,
|
|
311
|
+
});
|
|
312
|
+
}
|
|
286
313
|
throw error;
|
|
287
314
|
}
|
|
288
315
|
}
|
|
@@ -431,14 +458,27 @@ exports.InstitutionalSentimentMetrics = {
|
|
|
431
458
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
432
459
|
continue;
|
|
433
460
|
}
|
|
434
|
-
// Log structured error details and rethrow
|
|
435
|
-
|
|
436
|
-
operation
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
461
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
462
|
+
if (isConnectionError) {
|
|
463
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
464
|
+
operation: 'updateOneInstitutionalSentimentMetrics',
|
|
465
|
+
model: 'InstitutionalSentimentMetrics',
|
|
466
|
+
error: String(error),
|
|
467
|
+
recordId: props.id,
|
|
468
|
+
isRetryable: true,
|
|
469
|
+
transient: true,
|
|
470
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
logger_1.logger.error("Database update operation failed", {
|
|
475
|
+
operation: 'updateOneInstitutionalSentimentMetrics',
|
|
476
|
+
model: 'InstitutionalSentimentMetrics',
|
|
477
|
+
error: String(error),
|
|
478
|
+
recordId: props.id,
|
|
479
|
+
isRetryable: false,
|
|
480
|
+
});
|
|
481
|
+
}
|
|
442
482
|
throw error;
|
|
443
483
|
}
|
|
444
484
|
}
|
|
@@ -590,14 +630,27 @@ exports.InstitutionalSentimentMetrics = {
|
|
|
590
630
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
591
631
|
continue;
|
|
592
632
|
}
|
|
593
|
-
// Log structured error details and rethrow
|
|
594
|
-
|
|
595
|
-
operation
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
633
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
634
|
+
if (isConnectionError) {
|
|
635
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
636
|
+
operation: 'upsertOneInstitutionalSentimentMetrics',
|
|
637
|
+
model: 'InstitutionalSentimentMetrics',
|
|
638
|
+
error: String(error),
|
|
639
|
+
recordId: props.id,
|
|
640
|
+
isRetryable: true,
|
|
641
|
+
transient: true,
|
|
642
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
647
|
+
operation: 'upsertOneInstitutionalSentimentMetrics',
|
|
648
|
+
model: 'InstitutionalSentimentMetrics',
|
|
649
|
+
error: String(error),
|
|
650
|
+
recordId: props.id,
|
|
651
|
+
isRetryable: false,
|
|
652
|
+
});
|
|
653
|
+
}
|
|
601
654
|
throw error;
|
|
602
655
|
}
|
|
603
656
|
}
|
|
@@ -744,13 +797,25 @@ exports.InstitutionalSentimentMetrics = {
|
|
|
744
797
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
745
798
|
continue;
|
|
746
799
|
}
|
|
747
|
-
// Log structured error details and rethrow
|
|
748
|
-
|
|
749
|
-
operation
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
800
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
801
|
+
if (isConnectionError) {
|
|
802
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
803
|
+
operation: 'updateManyInstitutionalSentimentMetrics',
|
|
804
|
+
model: 'InstitutionalSentimentMetrics',
|
|
805
|
+
error: String(error),
|
|
806
|
+
isRetryable: true,
|
|
807
|
+
transient: true,
|
|
808
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
else {
|
|
812
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
813
|
+
operation: 'updateManyInstitutionalSentimentMetrics',
|
|
814
|
+
model: 'InstitutionalSentimentMetrics',
|
|
815
|
+
error: String(error),
|
|
816
|
+
isRetryable: false,
|
|
817
|
+
});
|
|
818
|
+
}
|
|
754
819
|
throw error;
|
|
755
820
|
}
|
|
756
821
|
}
|
|
@@ -873,14 +938,27 @@ exports.InstitutionalSentimentMetrics = {
|
|
|
873
938
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
874
939
|
continue;
|
|
875
940
|
}
|
|
876
|
-
// Log structured error details and rethrow
|
|
877
|
-
|
|
878
|
-
operation
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
941
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
942
|
+
if (isConnectionError) {
|
|
943
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
944
|
+
operation: 'deleteOneInstitutionalSentimentMetrics',
|
|
945
|
+
model: 'InstitutionalSentimentMetrics',
|
|
946
|
+
error: String(error),
|
|
947
|
+
recordId: props.id,
|
|
948
|
+
isRetryable: true,
|
|
949
|
+
transient: true,
|
|
950
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
else {
|
|
954
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
955
|
+
operation: 'deleteOneInstitutionalSentimentMetrics',
|
|
956
|
+
model: 'InstitutionalSentimentMetrics',
|
|
957
|
+
error: String(error),
|
|
958
|
+
recordId: props.id,
|
|
959
|
+
isRetryable: false,
|
|
960
|
+
});
|
|
961
|
+
}
|
|
884
962
|
throw error;
|
|
885
963
|
}
|
|
886
964
|
}
|
|
@@ -976,13 +1054,25 @@ exports.InstitutionalSentimentMetrics = {
|
|
|
976
1054
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
977
1055
|
continue;
|
|
978
1056
|
}
|
|
979
|
-
// Log structured error details and rethrow
|
|
980
|
-
|
|
981
|
-
operation
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1057
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1058
|
+
if (isConnectionError) {
|
|
1059
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1060
|
+
operation: 'getInstitutionalSentimentMetrics',
|
|
1061
|
+
model: 'InstitutionalSentimentMetrics',
|
|
1062
|
+
error: String(error),
|
|
1063
|
+
isRetryable: true,
|
|
1064
|
+
transient: true,
|
|
1065
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
1068
|
+
else {
|
|
1069
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1070
|
+
operation: 'getInstitutionalSentimentMetrics',
|
|
1071
|
+
model: 'InstitutionalSentimentMetrics',
|
|
1072
|
+
error: String(error),
|
|
1073
|
+
isRetryable: false,
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
986
1076
|
throw error;
|
|
987
1077
|
}
|
|
988
1078
|
}
|
|
@@ -1069,13 +1159,25 @@ exports.InstitutionalSentimentMetrics = {
|
|
|
1069
1159
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1070
1160
|
continue;
|
|
1071
1161
|
}
|
|
1072
|
-
// Log structured error details and rethrow
|
|
1073
|
-
|
|
1074
|
-
operation
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1162
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1163
|
+
if (isConnectionError) {
|
|
1164
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1165
|
+
operation: 'getAllInstitutionalSentimentMetrics',
|
|
1166
|
+
model: 'InstitutionalSentimentMetrics',
|
|
1167
|
+
error: String(error),
|
|
1168
|
+
isRetryable: true,
|
|
1169
|
+
transient: true,
|
|
1170
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
else {
|
|
1174
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1175
|
+
operation: 'getAllInstitutionalSentimentMetrics',
|
|
1176
|
+
model: 'InstitutionalSentimentMetrics',
|
|
1177
|
+
error: String(error),
|
|
1178
|
+
isRetryable: false,
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1079
1181
|
throw error;
|
|
1080
1182
|
}
|
|
1081
1183
|
}
|
|
@@ -1183,13 +1285,25 @@ exports.InstitutionalSentimentMetrics = {
|
|
|
1183
1285
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1184
1286
|
continue;
|
|
1185
1287
|
}
|
|
1186
|
-
// Log structured error details and rethrow
|
|
1187
|
-
|
|
1188
|
-
operation
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1288
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1289
|
+
if (isConnectionError) {
|
|
1290
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1291
|
+
operation: 'findManyInstitutionalSentimentMetrics',
|
|
1292
|
+
model: 'InstitutionalSentimentMetrics',
|
|
1293
|
+
error: String(error),
|
|
1294
|
+
isRetryable: true,
|
|
1295
|
+
transient: true,
|
|
1296
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
else {
|
|
1300
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1301
|
+
operation: 'findManyInstitutionalSentimentMetrics',
|
|
1302
|
+
model: 'InstitutionalSentimentMetrics',
|
|
1303
|
+
error: String(error),
|
|
1304
|
+
isRetryable: false,
|
|
1305
|
+
});
|
|
1306
|
+
}
|
|
1193
1307
|
throw error;
|
|
1194
1308
|
}
|
|
1195
1309
|
}
|