@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
package/SignalOutcome.cjs
CHANGED
|
@@ -158,13 +158,28 @@ exports.SignalOutcome = {
|
|
|
158
158
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
159
159
|
continue;
|
|
160
160
|
}
|
|
161
|
-
// Log structured error details and rethrow
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
161
|
+
// Log structured error details and rethrow.
|
|
162
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
163
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
164
|
+
// from true defects.
|
|
165
|
+
if (isConnectionError) {
|
|
166
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
167
|
+
operation: 'createOneSignalOutcome',
|
|
168
|
+
model: 'SignalOutcome',
|
|
169
|
+
error: String(error),
|
|
170
|
+
isRetryable: true,
|
|
171
|
+
transient: true,
|
|
172
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
logger_1.logger.error("Database create operation failed", {
|
|
177
|
+
operation: 'createOneSignalOutcome',
|
|
178
|
+
model: 'SignalOutcome',
|
|
179
|
+
error: String(error),
|
|
180
|
+
isRetryable: false,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
168
183
|
throw error;
|
|
169
184
|
}
|
|
170
185
|
}
|
|
@@ -296,13 +311,25 @@ exports.SignalOutcome = {
|
|
|
296
311
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
297
312
|
continue;
|
|
298
313
|
}
|
|
299
|
-
// Log structured error details and rethrow
|
|
300
|
-
|
|
301
|
-
operation
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
314
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
315
|
+
if (isConnectionError) {
|
|
316
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
317
|
+
operation: 'createManySignalOutcome',
|
|
318
|
+
model: 'SignalOutcome',
|
|
319
|
+
error: String(error),
|
|
320
|
+
isRetryable: true,
|
|
321
|
+
transient: true,
|
|
322
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
327
|
+
operation: 'createManySignalOutcome',
|
|
328
|
+
model: 'SignalOutcome',
|
|
329
|
+
error: String(error),
|
|
330
|
+
isRetryable: false,
|
|
331
|
+
});
|
|
332
|
+
}
|
|
306
333
|
throw error;
|
|
307
334
|
}
|
|
308
335
|
}
|
|
@@ -467,14 +494,27 @@ exports.SignalOutcome = {
|
|
|
467
494
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
468
495
|
continue;
|
|
469
496
|
}
|
|
470
|
-
// Log structured error details and rethrow
|
|
471
|
-
|
|
472
|
-
operation
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
497
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
498
|
+
if (isConnectionError) {
|
|
499
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
500
|
+
operation: 'updateOneSignalOutcome',
|
|
501
|
+
model: 'SignalOutcome',
|
|
502
|
+
error: String(error),
|
|
503
|
+
recordId: props.id,
|
|
504
|
+
isRetryable: true,
|
|
505
|
+
transient: true,
|
|
506
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
else {
|
|
510
|
+
logger_1.logger.error("Database update operation failed", {
|
|
511
|
+
operation: 'updateOneSignalOutcome',
|
|
512
|
+
model: 'SignalOutcome',
|
|
513
|
+
error: String(error),
|
|
514
|
+
recordId: props.id,
|
|
515
|
+
isRetryable: false,
|
|
516
|
+
});
|
|
517
|
+
}
|
|
478
518
|
throw error;
|
|
479
519
|
}
|
|
480
520
|
}
|
|
@@ -658,14 +698,27 @@ exports.SignalOutcome = {
|
|
|
658
698
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
659
699
|
continue;
|
|
660
700
|
}
|
|
661
|
-
// Log structured error details and rethrow
|
|
662
|
-
|
|
663
|
-
operation
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
701
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
702
|
+
if (isConnectionError) {
|
|
703
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
704
|
+
operation: 'upsertOneSignalOutcome',
|
|
705
|
+
model: 'SignalOutcome',
|
|
706
|
+
error: String(error),
|
|
707
|
+
recordId: props.id,
|
|
708
|
+
isRetryable: true,
|
|
709
|
+
transient: true,
|
|
710
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
else {
|
|
714
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
715
|
+
operation: 'upsertOneSignalOutcome',
|
|
716
|
+
model: 'SignalOutcome',
|
|
717
|
+
error: String(error),
|
|
718
|
+
recordId: props.id,
|
|
719
|
+
isRetryable: false,
|
|
720
|
+
});
|
|
721
|
+
}
|
|
669
722
|
throw error;
|
|
670
723
|
}
|
|
671
724
|
}
|
|
@@ -828,13 +881,25 @@ exports.SignalOutcome = {
|
|
|
828
881
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
829
882
|
continue;
|
|
830
883
|
}
|
|
831
|
-
// Log structured error details and rethrow
|
|
832
|
-
|
|
833
|
-
operation
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
884
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
885
|
+
if (isConnectionError) {
|
|
886
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
887
|
+
operation: 'updateManySignalOutcome',
|
|
888
|
+
model: 'SignalOutcome',
|
|
889
|
+
error: String(error),
|
|
890
|
+
isRetryable: true,
|
|
891
|
+
transient: true,
|
|
892
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
else {
|
|
896
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
897
|
+
operation: 'updateManySignalOutcome',
|
|
898
|
+
model: 'SignalOutcome',
|
|
899
|
+
error: String(error),
|
|
900
|
+
isRetryable: false,
|
|
901
|
+
});
|
|
902
|
+
}
|
|
838
903
|
throw error;
|
|
839
904
|
}
|
|
840
905
|
}
|
|
@@ -957,14 +1022,27 @@ exports.SignalOutcome = {
|
|
|
957
1022
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
958
1023
|
continue;
|
|
959
1024
|
}
|
|
960
|
-
// Log structured error details and rethrow
|
|
961
|
-
|
|
962
|
-
operation
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
1025
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1026
|
+
if (isConnectionError) {
|
|
1027
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1028
|
+
operation: 'deleteOneSignalOutcome',
|
|
1029
|
+
model: 'SignalOutcome',
|
|
1030
|
+
error: String(error),
|
|
1031
|
+
recordId: props.id,
|
|
1032
|
+
isRetryable: true,
|
|
1033
|
+
transient: true,
|
|
1034
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1035
|
+
});
|
|
1036
|
+
}
|
|
1037
|
+
else {
|
|
1038
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1039
|
+
operation: 'deleteOneSignalOutcome',
|
|
1040
|
+
model: 'SignalOutcome',
|
|
1041
|
+
error: String(error),
|
|
1042
|
+
recordId: props.id,
|
|
1043
|
+
isRetryable: false,
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
968
1046
|
throw error;
|
|
969
1047
|
}
|
|
970
1048
|
}
|
|
@@ -1066,13 +1144,25 @@ exports.SignalOutcome = {
|
|
|
1066
1144
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1067
1145
|
continue;
|
|
1068
1146
|
}
|
|
1069
|
-
// Log structured error details and rethrow
|
|
1070
|
-
|
|
1071
|
-
operation
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1147
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1148
|
+
if (isConnectionError) {
|
|
1149
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1150
|
+
operation: 'getSignalOutcome',
|
|
1151
|
+
model: 'SignalOutcome',
|
|
1152
|
+
error: String(error),
|
|
1153
|
+
isRetryable: true,
|
|
1154
|
+
transient: true,
|
|
1155
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
else {
|
|
1159
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1160
|
+
operation: 'getSignalOutcome',
|
|
1161
|
+
model: 'SignalOutcome',
|
|
1162
|
+
error: String(error),
|
|
1163
|
+
isRetryable: false,
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1076
1166
|
throw error;
|
|
1077
1167
|
}
|
|
1078
1168
|
}
|
|
@@ -1159,13 +1249,25 @@ exports.SignalOutcome = {
|
|
|
1159
1249
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1160
1250
|
continue;
|
|
1161
1251
|
}
|
|
1162
|
-
// Log structured error details and rethrow
|
|
1163
|
-
|
|
1164
|
-
operation
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1252
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1253
|
+
if (isConnectionError) {
|
|
1254
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1255
|
+
operation: 'getAllSignalOutcome',
|
|
1256
|
+
model: 'SignalOutcome',
|
|
1257
|
+
error: String(error),
|
|
1258
|
+
isRetryable: true,
|
|
1259
|
+
transient: true,
|
|
1260
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1261
|
+
});
|
|
1262
|
+
}
|
|
1263
|
+
else {
|
|
1264
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1265
|
+
operation: 'getAllSignalOutcome',
|
|
1266
|
+
model: 'SignalOutcome',
|
|
1267
|
+
error: String(error),
|
|
1268
|
+
isRetryable: false,
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1169
1271
|
throw error;
|
|
1170
1272
|
}
|
|
1171
1273
|
}
|
|
@@ -1279,13 +1381,25 @@ exports.SignalOutcome = {
|
|
|
1279
1381
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1280
1382
|
continue;
|
|
1281
1383
|
}
|
|
1282
|
-
// Log structured error details and rethrow
|
|
1283
|
-
|
|
1284
|
-
operation
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1384
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1385
|
+
if (isConnectionError) {
|
|
1386
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1387
|
+
operation: 'findManySignalOutcome',
|
|
1388
|
+
model: 'SignalOutcome',
|
|
1389
|
+
error: String(error),
|
|
1390
|
+
isRetryable: true,
|
|
1391
|
+
transient: true,
|
|
1392
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1395
|
+
else {
|
|
1396
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1397
|
+
operation: 'findManySignalOutcome',
|
|
1398
|
+
model: 'SignalOutcome',
|
|
1399
|
+
error: String(error),
|
|
1400
|
+
isRetryable: false,
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1289
1403
|
throw error;
|
|
1290
1404
|
}
|
|
1291
1405
|
}
|
package/SignalPriorityQueue.cjs
CHANGED
|
@@ -167,13 +167,28 @@ exports.SignalPriorityQueue = {
|
|
|
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: 'createOneSignalPriorityQueue',
|
|
177
|
+
model: 'SignalPriorityQueue',
|
|
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: 'createOneSignalPriorityQueue',
|
|
187
|
+
model: 'SignalPriorityQueue',
|
|
188
|
+
error: String(error),
|
|
189
|
+
isRetryable: false,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
177
192
|
throw error;
|
|
178
193
|
}
|
|
179
194
|
}
|
|
@@ -309,13 +324,25 @@ exports.SignalPriorityQueue = {
|
|
|
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: 'createManySignalPriorityQueue',
|
|
331
|
+
model: 'SignalPriorityQueue',
|
|
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: 'createManySignalPriorityQueue',
|
|
341
|
+
model: 'SignalPriorityQueue',
|
|
342
|
+
error: String(error),
|
|
343
|
+
isRetryable: false,
|
|
344
|
+
});
|
|
345
|
+
}
|
|
319
346
|
throw error;
|
|
320
347
|
}
|
|
321
348
|
}
|
|
@@ -493,14 +520,27 @@ exports.SignalPriorityQueue = {
|
|
|
493
520
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
494
521
|
continue;
|
|
495
522
|
}
|
|
496
|
-
// Log structured error details and rethrow
|
|
497
|
-
|
|
498
|
-
operation
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
523
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
524
|
+
if (isConnectionError) {
|
|
525
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
526
|
+
operation: 'updateOneSignalPriorityQueue',
|
|
527
|
+
model: 'SignalPriorityQueue',
|
|
528
|
+
error: String(error),
|
|
529
|
+
recordId: props.id,
|
|
530
|
+
isRetryable: true,
|
|
531
|
+
transient: true,
|
|
532
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
else {
|
|
536
|
+
logger_1.logger.error("Database update operation failed", {
|
|
537
|
+
operation: 'updateOneSignalPriorityQueue',
|
|
538
|
+
model: 'SignalPriorityQueue',
|
|
539
|
+
error: String(error),
|
|
540
|
+
recordId: props.id,
|
|
541
|
+
isRetryable: false,
|
|
542
|
+
});
|
|
543
|
+
}
|
|
504
544
|
throw error;
|
|
505
545
|
}
|
|
506
546
|
}
|
|
@@ -699,14 +739,27 @@ exports.SignalPriorityQueue = {
|
|
|
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: 'upsertOneSignalPriorityQueue',
|
|
746
|
+
model: 'SignalPriorityQueue',
|
|
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: 'upsertOneSignalPriorityQueue',
|
|
757
|
+
model: 'SignalPriorityQueue',
|
|
758
|
+
error: String(error),
|
|
759
|
+
recordId: props.id,
|
|
760
|
+
isRetryable: false,
|
|
761
|
+
});
|
|
762
|
+
}
|
|
710
763
|
throw error;
|
|
711
764
|
}
|
|
712
765
|
}
|
|
@@ -882,13 +935,25 @@ exports.SignalPriorityQueue = {
|
|
|
882
935
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
883
936
|
continue;
|
|
884
937
|
}
|
|
885
|
-
// Log structured error details and rethrow
|
|
886
|
-
|
|
887
|
-
operation
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
938
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
939
|
+
if (isConnectionError) {
|
|
940
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
941
|
+
operation: 'updateManySignalPriorityQueue',
|
|
942
|
+
model: 'SignalPriorityQueue',
|
|
943
|
+
error: String(error),
|
|
944
|
+
isRetryable: true,
|
|
945
|
+
transient: true,
|
|
946
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
else {
|
|
950
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
951
|
+
operation: 'updateManySignalPriorityQueue',
|
|
952
|
+
model: 'SignalPriorityQueue',
|
|
953
|
+
error: String(error),
|
|
954
|
+
isRetryable: false,
|
|
955
|
+
});
|
|
956
|
+
}
|
|
892
957
|
throw error;
|
|
893
958
|
}
|
|
894
959
|
}
|
|
@@ -1011,14 +1076,27 @@ exports.SignalPriorityQueue = {
|
|
|
1011
1076
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1012
1077
|
continue;
|
|
1013
1078
|
}
|
|
1014
|
-
// Log structured error details and rethrow
|
|
1015
|
-
|
|
1016
|
-
operation
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1079
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1080
|
+
if (isConnectionError) {
|
|
1081
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1082
|
+
operation: 'deleteOneSignalPriorityQueue',
|
|
1083
|
+
model: 'SignalPriorityQueue',
|
|
1084
|
+
error: String(error),
|
|
1085
|
+
recordId: props.id,
|
|
1086
|
+
isRetryable: true,
|
|
1087
|
+
transient: true,
|
|
1088
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
else {
|
|
1092
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1093
|
+
operation: 'deleteOneSignalPriorityQueue',
|
|
1094
|
+
model: 'SignalPriorityQueue',
|
|
1095
|
+
error: String(error),
|
|
1096
|
+
recordId: props.id,
|
|
1097
|
+
isRetryable: false,
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1022
1100
|
throw error;
|
|
1023
1101
|
}
|
|
1024
1102
|
}
|
|
@@ -1121,13 +1199,25 @@ exports.SignalPriorityQueue = {
|
|
|
1121
1199
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1122
1200
|
continue;
|
|
1123
1201
|
}
|
|
1124
|
-
// Log structured error details and rethrow
|
|
1125
|
-
|
|
1126
|
-
operation
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1202
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1203
|
+
if (isConnectionError) {
|
|
1204
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1205
|
+
operation: 'getSignalPriorityQueue',
|
|
1206
|
+
model: 'SignalPriorityQueue',
|
|
1207
|
+
error: String(error),
|
|
1208
|
+
isRetryable: true,
|
|
1209
|
+
transient: true,
|
|
1210
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1211
|
+
});
|
|
1212
|
+
}
|
|
1213
|
+
else {
|
|
1214
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1215
|
+
operation: 'getSignalPriorityQueue',
|
|
1216
|
+
model: 'SignalPriorityQueue',
|
|
1217
|
+
error: String(error),
|
|
1218
|
+
isRetryable: false,
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1131
1221
|
throw error;
|
|
1132
1222
|
}
|
|
1133
1223
|
}
|
|
@@ -1214,13 +1304,25 @@ exports.SignalPriorityQueue = {
|
|
|
1214
1304
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1215
1305
|
continue;
|
|
1216
1306
|
}
|
|
1217
|
-
// Log structured error details and rethrow
|
|
1218
|
-
|
|
1219
|
-
operation
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1307
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1308
|
+
if (isConnectionError) {
|
|
1309
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1310
|
+
operation: 'getAllSignalPriorityQueue',
|
|
1311
|
+
model: 'SignalPriorityQueue',
|
|
1312
|
+
error: String(error),
|
|
1313
|
+
isRetryable: true,
|
|
1314
|
+
transient: true,
|
|
1315
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1316
|
+
});
|
|
1317
|
+
}
|
|
1318
|
+
else {
|
|
1319
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1320
|
+
operation: 'getAllSignalPriorityQueue',
|
|
1321
|
+
model: 'SignalPriorityQueue',
|
|
1322
|
+
error: String(error),
|
|
1323
|
+
isRetryable: false,
|
|
1324
|
+
});
|
|
1325
|
+
}
|
|
1224
1326
|
throw error;
|
|
1225
1327
|
}
|
|
1226
1328
|
}
|
|
@@ -1337,13 +1439,25 @@ exports.SignalPriorityQueue = {
|
|
|
1337
1439
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1338
1440
|
continue;
|
|
1339
1441
|
}
|
|
1340
|
-
// Log structured error details and rethrow
|
|
1341
|
-
|
|
1342
|
-
operation
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1442
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1443
|
+
if (isConnectionError) {
|
|
1444
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1445
|
+
operation: 'findManySignalPriorityQueue',
|
|
1446
|
+
model: 'SignalPriorityQueue',
|
|
1447
|
+
error: String(error),
|
|
1448
|
+
isRetryable: true,
|
|
1449
|
+
transient: true,
|
|
1450
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1453
|
+
else {
|
|
1454
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1455
|
+
operation: 'findManySignalPriorityQueue',
|
|
1456
|
+
model: 'SignalPriorityQueue',
|
|
1457
|
+
error: String(error),
|
|
1458
|
+
isRetryable: false,
|
|
1459
|
+
});
|
|
1460
|
+
}
|
|
1347
1461
|
throw error;
|
|
1348
1462
|
}
|
|
1349
1463
|
}
|