@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
|
@@ -167,13 +167,28 @@ exports.SignalGeneratorMetrics = {
|
|
|
167
167
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
168
168
|
continue;
|
|
169
169
|
}
|
|
170
|
-
// Log structured error details and rethrow
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
170
|
+
// Log structured error details and rethrow.
|
|
171
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
172
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
173
|
+
// from true defects.
|
|
174
|
+
if (isConnectionError) {
|
|
175
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
176
|
+
operation: 'createOneSignalGeneratorMetrics',
|
|
177
|
+
model: 'SignalGeneratorMetrics',
|
|
178
|
+
error: String(error),
|
|
179
|
+
isRetryable: true,
|
|
180
|
+
transient: true,
|
|
181
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
logger_1.logger.error("Database create operation failed", {
|
|
186
|
+
operation: 'createOneSignalGeneratorMetrics',
|
|
187
|
+
model: 'SignalGeneratorMetrics',
|
|
188
|
+
error: String(error),
|
|
189
|
+
isRetryable: false,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
177
192
|
throw error;
|
|
178
193
|
}
|
|
179
194
|
}
|
|
@@ -309,13 +324,25 @@ exports.SignalGeneratorMetrics = {
|
|
|
309
324
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
310
325
|
continue;
|
|
311
326
|
}
|
|
312
|
-
// Log structured error details and rethrow
|
|
313
|
-
|
|
314
|
-
operation
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
327
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
328
|
+
if (isConnectionError) {
|
|
329
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
330
|
+
operation: 'createManySignalGeneratorMetrics',
|
|
331
|
+
model: 'SignalGeneratorMetrics',
|
|
332
|
+
error: String(error),
|
|
333
|
+
isRetryable: true,
|
|
334
|
+
transient: true,
|
|
335
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
340
|
+
operation: 'createManySignalGeneratorMetrics',
|
|
341
|
+
model: 'SignalGeneratorMetrics',
|
|
342
|
+
error: String(error),
|
|
343
|
+
isRetryable: false,
|
|
344
|
+
});
|
|
345
|
+
}
|
|
319
346
|
throw error;
|
|
320
347
|
}
|
|
321
348
|
}
|
|
@@ -495,14 +522,27 @@ exports.SignalGeneratorMetrics = {
|
|
|
495
522
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
496
523
|
continue;
|
|
497
524
|
}
|
|
498
|
-
// Log structured error details and rethrow
|
|
499
|
-
|
|
500
|
-
operation
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
525
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
526
|
+
if (isConnectionError) {
|
|
527
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
528
|
+
operation: 'updateOneSignalGeneratorMetrics',
|
|
529
|
+
model: 'SignalGeneratorMetrics',
|
|
530
|
+
error: String(error),
|
|
531
|
+
recordId: props.id,
|
|
532
|
+
isRetryable: true,
|
|
533
|
+
transient: true,
|
|
534
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
logger_1.logger.error("Database update operation failed", {
|
|
539
|
+
operation: 'updateOneSignalGeneratorMetrics',
|
|
540
|
+
model: 'SignalGeneratorMetrics',
|
|
541
|
+
error: String(error),
|
|
542
|
+
recordId: props.id,
|
|
543
|
+
isRetryable: false,
|
|
544
|
+
});
|
|
545
|
+
}
|
|
506
546
|
throw error;
|
|
507
547
|
}
|
|
508
548
|
}
|
|
@@ -699,14 +739,27 @@ exports.SignalGeneratorMetrics = {
|
|
|
699
739
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
700
740
|
continue;
|
|
701
741
|
}
|
|
702
|
-
// Log structured error details and rethrow
|
|
703
|
-
|
|
704
|
-
operation
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
742
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
743
|
+
if (isConnectionError) {
|
|
744
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
745
|
+
operation: 'upsertOneSignalGeneratorMetrics',
|
|
746
|
+
model: 'SignalGeneratorMetrics',
|
|
747
|
+
error: String(error),
|
|
748
|
+
recordId: props.id,
|
|
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 upsert operation failed", {
|
|
756
|
+
operation: 'upsertOneSignalGeneratorMetrics',
|
|
757
|
+
model: 'SignalGeneratorMetrics',
|
|
758
|
+
error: String(error),
|
|
759
|
+
recordId: props.id,
|
|
760
|
+
isRetryable: false,
|
|
761
|
+
});
|
|
762
|
+
}
|
|
710
763
|
throw error;
|
|
711
764
|
}
|
|
712
765
|
}
|
|
@@ -884,13 +937,25 @@ exports.SignalGeneratorMetrics = {
|
|
|
884
937
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
885
938
|
continue;
|
|
886
939
|
}
|
|
887
|
-
// Log structured error details and rethrow
|
|
888
|
-
|
|
889
|
-
operation
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
940
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
941
|
+
if (isConnectionError) {
|
|
942
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
943
|
+
operation: 'updateManySignalGeneratorMetrics',
|
|
944
|
+
model: 'SignalGeneratorMetrics',
|
|
945
|
+
error: String(error),
|
|
946
|
+
isRetryable: true,
|
|
947
|
+
transient: true,
|
|
948
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
else {
|
|
952
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
953
|
+
operation: 'updateManySignalGeneratorMetrics',
|
|
954
|
+
model: 'SignalGeneratorMetrics',
|
|
955
|
+
error: String(error),
|
|
956
|
+
isRetryable: false,
|
|
957
|
+
});
|
|
958
|
+
}
|
|
894
959
|
throw error;
|
|
895
960
|
}
|
|
896
961
|
}
|
|
@@ -1013,14 +1078,27 @@ exports.SignalGeneratorMetrics = {
|
|
|
1013
1078
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1014
1079
|
continue;
|
|
1015
1080
|
}
|
|
1016
|
-
// Log structured error details and rethrow
|
|
1017
|
-
|
|
1018
|
-
operation
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1081
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1082
|
+
if (isConnectionError) {
|
|
1083
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1084
|
+
operation: 'deleteOneSignalGeneratorMetrics',
|
|
1085
|
+
model: 'SignalGeneratorMetrics',
|
|
1086
|
+
error: String(error),
|
|
1087
|
+
recordId: props.id,
|
|
1088
|
+
isRetryable: true,
|
|
1089
|
+
transient: true,
|
|
1090
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
else {
|
|
1094
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1095
|
+
operation: 'deleteOneSignalGeneratorMetrics',
|
|
1096
|
+
model: 'SignalGeneratorMetrics',
|
|
1097
|
+
error: String(error),
|
|
1098
|
+
recordId: props.id,
|
|
1099
|
+
isRetryable: false,
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1024
1102
|
throw error;
|
|
1025
1103
|
}
|
|
1026
1104
|
}
|
|
@@ -1119,13 +1197,25 @@ exports.SignalGeneratorMetrics = {
|
|
|
1119
1197
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1120
1198
|
continue;
|
|
1121
1199
|
}
|
|
1122
|
-
// Log structured error details and rethrow
|
|
1123
|
-
|
|
1124
|
-
operation
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1200
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1201
|
+
if (isConnectionError) {
|
|
1202
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1203
|
+
operation: 'getSignalGeneratorMetrics',
|
|
1204
|
+
model: 'SignalGeneratorMetrics',
|
|
1205
|
+
error: String(error),
|
|
1206
|
+
isRetryable: true,
|
|
1207
|
+
transient: true,
|
|
1208
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
else {
|
|
1212
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1213
|
+
operation: 'getSignalGeneratorMetrics',
|
|
1214
|
+
model: 'SignalGeneratorMetrics',
|
|
1215
|
+
error: String(error),
|
|
1216
|
+
isRetryable: false,
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
1129
1219
|
throw error;
|
|
1130
1220
|
}
|
|
1131
1221
|
}
|
|
@@ -1212,13 +1302,25 @@ exports.SignalGeneratorMetrics = {
|
|
|
1212
1302
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1213
1303
|
continue;
|
|
1214
1304
|
}
|
|
1215
|
-
// Log structured error details and rethrow
|
|
1216
|
-
|
|
1217
|
-
operation
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1305
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1306
|
+
if (isConnectionError) {
|
|
1307
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1308
|
+
operation: 'getAllSignalGeneratorMetrics',
|
|
1309
|
+
model: 'SignalGeneratorMetrics',
|
|
1310
|
+
error: String(error),
|
|
1311
|
+
isRetryable: true,
|
|
1312
|
+
transient: true,
|
|
1313
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1316
|
+
else {
|
|
1317
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1318
|
+
operation: 'getAllSignalGeneratorMetrics',
|
|
1319
|
+
model: 'SignalGeneratorMetrics',
|
|
1320
|
+
error: String(error),
|
|
1321
|
+
isRetryable: false,
|
|
1322
|
+
});
|
|
1323
|
+
}
|
|
1222
1324
|
throw error;
|
|
1223
1325
|
}
|
|
1224
1326
|
}
|
|
@@ -1329,13 +1431,25 @@ exports.SignalGeneratorMetrics = {
|
|
|
1329
1431
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1330
1432
|
continue;
|
|
1331
1433
|
}
|
|
1332
|
-
// Log structured error details and rethrow
|
|
1333
|
-
|
|
1334
|
-
operation
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1434
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1435
|
+
if (isConnectionError) {
|
|
1436
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1437
|
+
operation: 'findManySignalGeneratorMetrics',
|
|
1438
|
+
model: 'SignalGeneratorMetrics',
|
|
1439
|
+
error: String(error),
|
|
1440
|
+
isRetryable: true,
|
|
1441
|
+
transient: true,
|
|
1442
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1443
|
+
});
|
|
1444
|
+
}
|
|
1445
|
+
else {
|
|
1446
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1447
|
+
operation: 'findManySignalGeneratorMetrics',
|
|
1448
|
+
model: 'SignalGeneratorMetrics',
|
|
1449
|
+
error: String(error),
|
|
1450
|
+
isRetryable: false,
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1339
1453
|
throw error;
|
|
1340
1454
|
}
|
|
1341
1455
|
}
|
package/SignalLineage.cjs
CHANGED
|
@@ -185,13 +185,28 @@ exports.SignalLineage = {
|
|
|
185
185
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
186
186
|
continue;
|
|
187
187
|
}
|
|
188
|
-
// Log structured error details and rethrow
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
188
|
+
// Log structured error details and rethrow.
|
|
189
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
190
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
191
|
+
// from true defects.
|
|
192
|
+
if (isConnectionError) {
|
|
193
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
194
|
+
operation: 'createOneSignalLineage',
|
|
195
|
+
model: 'SignalLineage',
|
|
196
|
+
error: String(error),
|
|
197
|
+
isRetryable: true,
|
|
198
|
+
transient: true,
|
|
199
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
logger_1.logger.error("Database create operation failed", {
|
|
204
|
+
operation: 'createOneSignalLineage',
|
|
205
|
+
model: 'SignalLineage',
|
|
206
|
+
error: String(error),
|
|
207
|
+
isRetryable: false,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
195
210
|
throw error;
|
|
196
211
|
}
|
|
197
212
|
}
|
|
@@ -336,13 +351,25 @@ exports.SignalLineage = {
|
|
|
336
351
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
337
352
|
continue;
|
|
338
353
|
}
|
|
339
|
-
// Log structured error details and rethrow
|
|
340
|
-
|
|
341
|
-
operation
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
354
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
355
|
+
if (isConnectionError) {
|
|
356
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
357
|
+
operation: 'createManySignalLineage',
|
|
358
|
+
model: 'SignalLineage',
|
|
359
|
+
error: String(error),
|
|
360
|
+
isRetryable: true,
|
|
361
|
+
transient: true,
|
|
362
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
367
|
+
operation: 'createManySignalLineage',
|
|
368
|
+
model: 'SignalLineage',
|
|
369
|
+
error: String(error),
|
|
370
|
+
isRetryable: false,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
346
373
|
throw error;
|
|
347
374
|
}
|
|
348
375
|
}
|
|
@@ -525,14 +552,27 @@ exports.SignalLineage = {
|
|
|
525
552
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
526
553
|
continue;
|
|
527
554
|
}
|
|
528
|
-
// Log structured error details and rethrow
|
|
529
|
-
|
|
530
|
-
operation
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
555
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
556
|
+
if (isConnectionError) {
|
|
557
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
558
|
+
operation: 'updateOneSignalLineage',
|
|
559
|
+
model: 'SignalLineage',
|
|
560
|
+
error: String(error),
|
|
561
|
+
recordId: props.id,
|
|
562
|
+
isRetryable: true,
|
|
563
|
+
transient: true,
|
|
564
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
else {
|
|
568
|
+
logger_1.logger.error("Database update operation failed", {
|
|
569
|
+
operation: 'updateOneSignalLineage',
|
|
570
|
+
model: 'SignalLineage',
|
|
571
|
+
error: String(error),
|
|
572
|
+
recordId: props.id,
|
|
573
|
+
isRetryable: false,
|
|
574
|
+
});
|
|
575
|
+
}
|
|
536
576
|
throw error;
|
|
537
577
|
}
|
|
538
578
|
}
|
|
@@ -745,14 +785,27 @@ exports.SignalLineage = {
|
|
|
745
785
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
746
786
|
continue;
|
|
747
787
|
}
|
|
748
|
-
// Log structured error details and rethrow
|
|
749
|
-
|
|
750
|
-
operation
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
788
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
789
|
+
if (isConnectionError) {
|
|
790
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
791
|
+
operation: 'upsertOneSignalLineage',
|
|
792
|
+
model: 'SignalLineage',
|
|
793
|
+
error: String(error),
|
|
794
|
+
recordId: props.id,
|
|
795
|
+
isRetryable: true,
|
|
796
|
+
transient: true,
|
|
797
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
|
+
else {
|
|
801
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
802
|
+
operation: 'upsertOneSignalLineage',
|
|
803
|
+
model: 'SignalLineage',
|
|
804
|
+
error: String(error),
|
|
805
|
+
recordId: props.id,
|
|
806
|
+
isRetryable: false,
|
|
807
|
+
});
|
|
808
|
+
}
|
|
756
809
|
throw error;
|
|
757
810
|
}
|
|
758
811
|
}
|
|
@@ -933,13 +986,25 @@ exports.SignalLineage = {
|
|
|
933
986
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
934
987
|
continue;
|
|
935
988
|
}
|
|
936
|
-
// Log structured error details and rethrow
|
|
937
|
-
|
|
938
|
-
operation
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
989
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
990
|
+
if (isConnectionError) {
|
|
991
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
992
|
+
operation: 'updateManySignalLineage',
|
|
993
|
+
model: 'SignalLineage',
|
|
994
|
+
error: String(error),
|
|
995
|
+
isRetryable: true,
|
|
996
|
+
transient: true,
|
|
997
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
else {
|
|
1001
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
1002
|
+
operation: 'updateManySignalLineage',
|
|
1003
|
+
model: 'SignalLineage',
|
|
1004
|
+
error: String(error),
|
|
1005
|
+
isRetryable: false,
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
943
1008
|
throw error;
|
|
944
1009
|
}
|
|
945
1010
|
}
|
|
@@ -1062,14 +1127,27 @@ exports.SignalLineage = {
|
|
|
1062
1127
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1063
1128
|
continue;
|
|
1064
1129
|
}
|
|
1065
|
-
// Log structured error details and rethrow
|
|
1066
|
-
|
|
1067
|
-
operation
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1130
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1131
|
+
if (isConnectionError) {
|
|
1132
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1133
|
+
operation: 'deleteOneSignalLineage',
|
|
1134
|
+
model: 'SignalLineage',
|
|
1135
|
+
error: String(error),
|
|
1136
|
+
recordId: props.id,
|
|
1137
|
+
isRetryable: true,
|
|
1138
|
+
transient: true,
|
|
1139
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
else {
|
|
1143
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1144
|
+
operation: 'deleteOneSignalLineage',
|
|
1145
|
+
model: 'SignalLineage',
|
|
1146
|
+
error: String(error),
|
|
1147
|
+
recordId: props.id,
|
|
1148
|
+
isRetryable: false,
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1073
1151
|
throw error;
|
|
1074
1152
|
}
|
|
1075
1153
|
}
|
|
@@ -1172,13 +1250,25 @@ exports.SignalLineage = {
|
|
|
1172
1250
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1173
1251
|
continue;
|
|
1174
1252
|
}
|
|
1175
|
-
// Log structured error details and rethrow
|
|
1176
|
-
|
|
1177
|
-
operation
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1253
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1254
|
+
if (isConnectionError) {
|
|
1255
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1256
|
+
operation: 'getSignalLineage',
|
|
1257
|
+
model: 'SignalLineage',
|
|
1258
|
+
error: String(error),
|
|
1259
|
+
isRetryable: true,
|
|
1260
|
+
transient: true,
|
|
1261
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1262
|
+
});
|
|
1263
|
+
}
|
|
1264
|
+
else {
|
|
1265
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1266
|
+
operation: 'getSignalLineage',
|
|
1267
|
+
model: 'SignalLineage',
|
|
1268
|
+
error: String(error),
|
|
1269
|
+
isRetryable: false,
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1182
1272
|
throw error;
|
|
1183
1273
|
}
|
|
1184
1274
|
}
|
|
@@ -1265,13 +1355,25 @@ exports.SignalLineage = {
|
|
|
1265
1355
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1266
1356
|
continue;
|
|
1267
1357
|
}
|
|
1268
|
-
// Log structured error details and rethrow
|
|
1269
|
-
|
|
1270
|
-
operation
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1358
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1359
|
+
if (isConnectionError) {
|
|
1360
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1361
|
+
operation: 'getAllSignalLineage',
|
|
1362
|
+
model: 'SignalLineage',
|
|
1363
|
+
error: String(error),
|
|
1364
|
+
isRetryable: true,
|
|
1365
|
+
transient: true,
|
|
1366
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
else {
|
|
1370
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1371
|
+
operation: 'getAllSignalLineage',
|
|
1372
|
+
model: 'SignalLineage',
|
|
1373
|
+
error: String(error),
|
|
1374
|
+
isRetryable: false,
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1275
1377
|
throw error;
|
|
1276
1378
|
}
|
|
1277
1379
|
}
|
|
@@ -1388,13 +1490,25 @@ exports.SignalLineage = {
|
|
|
1388
1490
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1389
1491
|
continue;
|
|
1390
1492
|
}
|
|
1391
|
-
// Log structured error details and rethrow
|
|
1392
|
-
|
|
1393
|
-
operation
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1493
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1494
|
+
if (isConnectionError) {
|
|
1495
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1496
|
+
operation: 'findManySignalLineage',
|
|
1497
|
+
model: 'SignalLineage',
|
|
1498
|
+
error: String(error),
|
|
1499
|
+
isRetryable: true,
|
|
1500
|
+
transient: true,
|
|
1501
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1502
|
+
});
|
|
1503
|
+
}
|
|
1504
|
+
else {
|
|
1505
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1506
|
+
operation: 'findManySignalLineage',
|
|
1507
|
+
model: 'SignalLineage',
|
|
1508
|
+
error: String(error),
|
|
1509
|
+
isRetryable: false,
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1398
1512
|
throw error;
|
|
1399
1513
|
}
|
|
1400
1514
|
}
|