@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/ConflictEvent.cjs
CHANGED
|
@@ -141,13 +141,28 @@ exports.ConflictEvent = {
|
|
|
141
141
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
142
142
|
continue;
|
|
143
143
|
}
|
|
144
|
-
// Log structured error details and rethrow
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
144
|
+
// Log structured error details and rethrow.
|
|
145
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
146
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
147
|
+
// from true defects.
|
|
148
|
+
if (isConnectionError) {
|
|
149
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
150
|
+
operation: 'createOneConflictEvent',
|
|
151
|
+
model: 'ConflictEvent',
|
|
152
|
+
error: String(error),
|
|
153
|
+
isRetryable: true,
|
|
154
|
+
transient: true,
|
|
155
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
logger_1.logger.error("Database create operation failed", {
|
|
160
|
+
operation: 'createOneConflictEvent',
|
|
161
|
+
model: 'ConflictEvent',
|
|
162
|
+
error: String(error),
|
|
163
|
+
isRetryable: false,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
151
166
|
throw error;
|
|
152
167
|
}
|
|
153
168
|
}
|
|
@@ -274,13 +289,25 @@ exports.ConflictEvent = {
|
|
|
274
289
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
275
290
|
continue;
|
|
276
291
|
}
|
|
277
|
-
// Log structured error details and rethrow
|
|
278
|
-
|
|
279
|
-
operation
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
292
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
293
|
+
if (isConnectionError) {
|
|
294
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
295
|
+
operation: 'createManyConflictEvent',
|
|
296
|
+
model: 'ConflictEvent',
|
|
297
|
+
error: String(error),
|
|
298
|
+
isRetryable: true,
|
|
299
|
+
transient: true,
|
|
300
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
305
|
+
operation: 'createManyConflictEvent',
|
|
306
|
+
model: 'ConflictEvent',
|
|
307
|
+
error: String(error),
|
|
308
|
+
isRetryable: false,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
284
311
|
throw error;
|
|
285
312
|
}
|
|
286
313
|
}
|
|
@@ -426,14 +453,27 @@ exports.ConflictEvent = {
|
|
|
426
453
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
427
454
|
continue;
|
|
428
455
|
}
|
|
429
|
-
// Log structured error details and rethrow
|
|
430
|
-
|
|
431
|
-
operation
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
456
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
457
|
+
if (isConnectionError) {
|
|
458
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
459
|
+
operation: 'updateOneConflictEvent',
|
|
460
|
+
model: 'ConflictEvent',
|
|
461
|
+
error: String(error),
|
|
462
|
+
recordId: props.id,
|
|
463
|
+
isRetryable: true,
|
|
464
|
+
transient: true,
|
|
465
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
logger_1.logger.error("Database update operation failed", {
|
|
470
|
+
operation: 'updateOneConflictEvent',
|
|
471
|
+
model: 'ConflictEvent',
|
|
472
|
+
error: String(error),
|
|
473
|
+
recordId: props.id,
|
|
474
|
+
isRetryable: false,
|
|
475
|
+
});
|
|
476
|
+
}
|
|
437
477
|
throw error;
|
|
438
478
|
}
|
|
439
479
|
}
|
|
@@ -590,14 +630,27 @@ exports.ConflictEvent = {
|
|
|
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: 'upsertOneConflictEvent',
|
|
637
|
+
model: 'ConflictEvent',
|
|
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: 'upsertOneConflictEvent',
|
|
648
|
+
model: 'ConflictEvent',
|
|
649
|
+
error: String(error),
|
|
650
|
+
recordId: props.id,
|
|
651
|
+
isRetryable: false,
|
|
652
|
+
});
|
|
653
|
+
}
|
|
601
654
|
throw error;
|
|
602
655
|
}
|
|
603
656
|
}
|
|
@@ -741,13 +794,25 @@ exports.ConflictEvent = {
|
|
|
741
794
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
742
795
|
continue;
|
|
743
796
|
}
|
|
744
|
-
// Log structured error details and rethrow
|
|
745
|
-
|
|
746
|
-
operation
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
797
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
798
|
+
if (isConnectionError) {
|
|
799
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
800
|
+
operation: 'updateManyConflictEvent',
|
|
801
|
+
model: 'ConflictEvent',
|
|
802
|
+
error: String(error),
|
|
803
|
+
isRetryable: true,
|
|
804
|
+
transient: true,
|
|
805
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
else {
|
|
809
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
810
|
+
operation: 'updateManyConflictEvent',
|
|
811
|
+
model: 'ConflictEvent',
|
|
812
|
+
error: String(error),
|
|
813
|
+
isRetryable: false,
|
|
814
|
+
});
|
|
815
|
+
}
|
|
751
816
|
throw error;
|
|
752
817
|
}
|
|
753
818
|
}
|
|
@@ -870,14 +935,27 @@ exports.ConflictEvent = {
|
|
|
870
935
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
871
936
|
continue;
|
|
872
937
|
}
|
|
873
|
-
// Log structured error details and rethrow
|
|
874
|
-
|
|
875
|
-
operation
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
938
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
939
|
+
if (isConnectionError) {
|
|
940
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
941
|
+
operation: 'deleteOneConflictEvent',
|
|
942
|
+
model: 'ConflictEvent',
|
|
943
|
+
error: String(error),
|
|
944
|
+
recordId: props.id,
|
|
945
|
+
isRetryable: true,
|
|
946
|
+
transient: true,
|
|
947
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
else {
|
|
951
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
952
|
+
operation: 'deleteOneConflictEvent',
|
|
953
|
+
model: 'ConflictEvent',
|
|
954
|
+
error: String(error),
|
|
955
|
+
recordId: props.id,
|
|
956
|
+
isRetryable: false,
|
|
957
|
+
});
|
|
958
|
+
}
|
|
881
959
|
throw error;
|
|
882
960
|
}
|
|
883
961
|
}
|
|
@@ -976,13 +1054,25 @@ exports.ConflictEvent = {
|
|
|
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: 'getConflictEvent',
|
|
1061
|
+
model: 'ConflictEvent',
|
|
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: 'getConflictEvent',
|
|
1071
|
+
model: 'ConflictEvent',
|
|
1072
|
+
error: String(error),
|
|
1073
|
+
isRetryable: false,
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
986
1076
|
throw error;
|
|
987
1077
|
}
|
|
988
1078
|
}
|
|
@@ -1069,13 +1159,25 @@ exports.ConflictEvent = {
|
|
|
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: 'getAllConflictEvent',
|
|
1166
|
+
model: 'ConflictEvent',
|
|
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: 'getAllConflictEvent',
|
|
1176
|
+
model: 'ConflictEvent',
|
|
1177
|
+
error: String(error),
|
|
1178
|
+
isRetryable: false,
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1079
1181
|
throw error;
|
|
1080
1182
|
}
|
|
1081
1183
|
}
|
|
@@ -1186,13 +1288,25 @@ exports.ConflictEvent = {
|
|
|
1186
1288
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1187
1289
|
continue;
|
|
1188
1290
|
}
|
|
1189
|
-
// Log structured error details and rethrow
|
|
1190
|
-
|
|
1191
|
-
operation
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1291
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1292
|
+
if (isConnectionError) {
|
|
1293
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1294
|
+
operation: 'findManyConflictEvent',
|
|
1295
|
+
model: 'ConflictEvent',
|
|
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 findMany operation failed", {
|
|
1304
|
+
operation: 'findManyConflictEvent',
|
|
1305
|
+
model: 'ConflictEvent',
|
|
1306
|
+
error: String(error),
|
|
1307
|
+
isRetryable: false,
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1196
1310
|
throw error;
|
|
1197
1311
|
}
|
|
1198
1312
|
}
|
|
@@ -143,13 +143,28 @@ exports.ConnectionHealthSnapshot = {
|
|
|
143
143
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
144
144
|
continue;
|
|
145
145
|
}
|
|
146
|
-
// Log structured error details and rethrow
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
146
|
+
// Log structured error details and rethrow.
|
|
147
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
148
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
149
|
+
// from true defects.
|
|
150
|
+
if (isConnectionError) {
|
|
151
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
152
|
+
operation: 'createOneConnectionHealthSnapshot',
|
|
153
|
+
model: 'ConnectionHealthSnapshot',
|
|
154
|
+
error: String(error),
|
|
155
|
+
isRetryable: true,
|
|
156
|
+
transient: true,
|
|
157
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
logger_1.logger.error("Database create operation failed", {
|
|
162
|
+
operation: 'createOneConnectionHealthSnapshot',
|
|
163
|
+
model: 'ConnectionHealthSnapshot',
|
|
164
|
+
error: String(error),
|
|
165
|
+
isRetryable: false,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
153
168
|
throw error;
|
|
154
169
|
}
|
|
155
170
|
}
|
|
@@ -273,13 +288,25 @@ exports.ConnectionHealthSnapshot = {
|
|
|
273
288
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
274
289
|
continue;
|
|
275
290
|
}
|
|
276
|
-
// Log structured error details and rethrow
|
|
277
|
-
|
|
278
|
-
operation
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
291
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
292
|
+
if (isConnectionError) {
|
|
293
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
294
|
+
operation: 'createManyConnectionHealthSnapshot',
|
|
295
|
+
model: 'ConnectionHealthSnapshot',
|
|
296
|
+
error: String(error),
|
|
297
|
+
isRetryable: true,
|
|
298
|
+
transient: true,
|
|
299
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
304
|
+
operation: 'createManyConnectionHealthSnapshot',
|
|
305
|
+
model: 'ConnectionHealthSnapshot',
|
|
306
|
+
error: String(error),
|
|
307
|
+
isRetryable: false,
|
|
308
|
+
});
|
|
309
|
+
}
|
|
283
310
|
throw error;
|
|
284
311
|
}
|
|
285
312
|
}
|
|
@@ -421,14 +448,27 @@ exports.ConnectionHealthSnapshot = {
|
|
|
421
448
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
422
449
|
continue;
|
|
423
450
|
}
|
|
424
|
-
// Log structured error details and rethrow
|
|
425
|
-
|
|
426
|
-
operation
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
451
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
452
|
+
if (isConnectionError) {
|
|
453
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
454
|
+
operation: 'updateOneConnectionHealthSnapshot',
|
|
455
|
+
model: 'ConnectionHealthSnapshot',
|
|
456
|
+
error: String(error),
|
|
457
|
+
recordId: props.id,
|
|
458
|
+
isRetryable: true,
|
|
459
|
+
transient: true,
|
|
460
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
logger_1.logger.error("Database update operation failed", {
|
|
465
|
+
operation: 'updateOneConnectionHealthSnapshot',
|
|
466
|
+
model: 'ConnectionHealthSnapshot',
|
|
467
|
+
error: String(error),
|
|
468
|
+
recordId: props.id,
|
|
469
|
+
isRetryable: false,
|
|
470
|
+
});
|
|
471
|
+
}
|
|
432
472
|
throw error;
|
|
433
473
|
}
|
|
434
474
|
}
|
|
@@ -575,14 +615,27 @@ exports.ConnectionHealthSnapshot = {
|
|
|
575
615
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
576
616
|
continue;
|
|
577
617
|
}
|
|
578
|
-
// Log structured error details and rethrow
|
|
579
|
-
|
|
580
|
-
operation
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
618
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
619
|
+
if (isConnectionError) {
|
|
620
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
621
|
+
operation: 'upsertOneConnectionHealthSnapshot',
|
|
622
|
+
model: 'ConnectionHealthSnapshot',
|
|
623
|
+
error: String(error),
|
|
624
|
+
recordId: props.id,
|
|
625
|
+
isRetryable: true,
|
|
626
|
+
transient: true,
|
|
627
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
632
|
+
operation: 'upsertOneConnectionHealthSnapshot',
|
|
633
|
+
model: 'ConnectionHealthSnapshot',
|
|
634
|
+
error: String(error),
|
|
635
|
+
recordId: props.id,
|
|
636
|
+
isRetryable: false,
|
|
637
|
+
});
|
|
638
|
+
}
|
|
586
639
|
throw error;
|
|
587
640
|
}
|
|
588
641
|
}
|
|
@@ -722,13 +775,25 @@ exports.ConnectionHealthSnapshot = {
|
|
|
722
775
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
723
776
|
continue;
|
|
724
777
|
}
|
|
725
|
-
// Log structured error details and rethrow
|
|
726
|
-
|
|
727
|
-
operation
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
778
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
779
|
+
if (isConnectionError) {
|
|
780
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
781
|
+
operation: 'updateManyConnectionHealthSnapshot',
|
|
782
|
+
model: 'ConnectionHealthSnapshot',
|
|
783
|
+
error: String(error),
|
|
784
|
+
isRetryable: true,
|
|
785
|
+
transient: true,
|
|
786
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
else {
|
|
790
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
791
|
+
operation: 'updateManyConnectionHealthSnapshot',
|
|
792
|
+
model: 'ConnectionHealthSnapshot',
|
|
793
|
+
error: String(error),
|
|
794
|
+
isRetryable: false,
|
|
795
|
+
});
|
|
796
|
+
}
|
|
732
797
|
throw error;
|
|
733
798
|
}
|
|
734
799
|
}
|
|
@@ -851,14 +916,27 @@ exports.ConnectionHealthSnapshot = {
|
|
|
851
916
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
852
917
|
continue;
|
|
853
918
|
}
|
|
854
|
-
// Log structured error details and rethrow
|
|
855
|
-
|
|
856
|
-
operation
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
919
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
920
|
+
if (isConnectionError) {
|
|
921
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
922
|
+
operation: 'deleteOneConnectionHealthSnapshot',
|
|
923
|
+
model: 'ConnectionHealthSnapshot',
|
|
924
|
+
error: String(error),
|
|
925
|
+
recordId: props.id,
|
|
926
|
+
isRetryable: true,
|
|
927
|
+
transient: true,
|
|
928
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
else {
|
|
932
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
933
|
+
operation: 'deleteOneConnectionHealthSnapshot',
|
|
934
|
+
model: 'ConnectionHealthSnapshot',
|
|
935
|
+
error: String(error),
|
|
936
|
+
recordId: props.id,
|
|
937
|
+
isRetryable: false,
|
|
938
|
+
});
|
|
939
|
+
}
|
|
862
940
|
throw error;
|
|
863
941
|
}
|
|
864
942
|
}
|
|
@@ -957,13 +1035,25 @@ exports.ConnectionHealthSnapshot = {
|
|
|
957
1035
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
958
1036
|
continue;
|
|
959
1037
|
}
|
|
960
|
-
// Log structured error details and rethrow
|
|
961
|
-
|
|
962
|
-
operation
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1038
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1039
|
+
if (isConnectionError) {
|
|
1040
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1041
|
+
operation: 'getConnectionHealthSnapshot',
|
|
1042
|
+
model: 'ConnectionHealthSnapshot',
|
|
1043
|
+
error: String(error),
|
|
1044
|
+
isRetryable: true,
|
|
1045
|
+
transient: true,
|
|
1046
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
else {
|
|
1050
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1051
|
+
operation: 'getConnectionHealthSnapshot',
|
|
1052
|
+
model: 'ConnectionHealthSnapshot',
|
|
1053
|
+
error: String(error),
|
|
1054
|
+
isRetryable: false,
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
967
1057
|
throw error;
|
|
968
1058
|
}
|
|
969
1059
|
}
|
|
@@ -1050,13 +1140,25 @@ exports.ConnectionHealthSnapshot = {
|
|
|
1050
1140
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1051
1141
|
continue;
|
|
1052
1142
|
}
|
|
1053
|
-
// Log structured error details and rethrow
|
|
1054
|
-
|
|
1055
|
-
operation
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1143
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1144
|
+
if (isConnectionError) {
|
|
1145
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1146
|
+
operation: 'getAllConnectionHealthSnapshot',
|
|
1147
|
+
model: 'ConnectionHealthSnapshot',
|
|
1148
|
+
error: String(error),
|
|
1149
|
+
isRetryable: true,
|
|
1150
|
+
transient: true,
|
|
1151
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1152
|
+
});
|
|
1153
|
+
}
|
|
1154
|
+
else {
|
|
1155
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1156
|
+
operation: 'getAllConnectionHealthSnapshot',
|
|
1157
|
+
model: 'ConnectionHealthSnapshot',
|
|
1158
|
+
error: String(error),
|
|
1159
|
+
isRetryable: false,
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1060
1162
|
throw error;
|
|
1061
1163
|
}
|
|
1062
1164
|
}
|
|
@@ -1167,13 +1269,25 @@ exports.ConnectionHealthSnapshot = {
|
|
|
1167
1269
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1168
1270
|
continue;
|
|
1169
1271
|
}
|
|
1170
|
-
// Log structured error details and rethrow
|
|
1171
|
-
|
|
1172
|
-
operation
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1272
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1273
|
+
if (isConnectionError) {
|
|
1274
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1275
|
+
operation: 'findManyConnectionHealthSnapshot',
|
|
1276
|
+
model: 'ConnectionHealthSnapshot',
|
|
1277
|
+
error: String(error),
|
|
1278
|
+
isRetryable: true,
|
|
1279
|
+
transient: true,
|
|
1280
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1281
|
+
});
|
|
1282
|
+
}
|
|
1283
|
+
else {
|
|
1284
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1285
|
+
operation: 'findManyConnectionHealthSnapshot',
|
|
1286
|
+
model: 'ConnectionHealthSnapshot',
|
|
1287
|
+
error: String(error),
|
|
1288
|
+
isRetryable: false,
|
|
1289
|
+
});
|
|
1290
|
+
}
|
|
1177
1291
|
throw error;
|
|
1178
1292
|
}
|
|
1179
1293
|
}
|