@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
package/OptionsPositionEvent.cjs
CHANGED
|
@@ -451,13 +451,28 @@ exports.OptionsPositionEvent = {
|
|
|
451
451
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
452
452
|
continue;
|
|
453
453
|
}
|
|
454
|
-
// Log structured error details and rethrow
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
454
|
+
// Log structured error details and rethrow.
|
|
455
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
456
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
457
|
+
// from true defects.
|
|
458
|
+
if (isConnectionError) {
|
|
459
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
460
|
+
operation: 'createOneOptionsPositionEvent',
|
|
461
|
+
model: 'OptionsPositionEvent',
|
|
462
|
+
error: String(error),
|
|
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 create operation failed", {
|
|
470
|
+
operation: 'createOneOptionsPositionEvent',
|
|
471
|
+
model: 'OptionsPositionEvent',
|
|
472
|
+
error: String(error),
|
|
473
|
+
isRetryable: false,
|
|
474
|
+
});
|
|
475
|
+
}
|
|
461
476
|
throw error;
|
|
462
477
|
}
|
|
463
478
|
}
|
|
@@ -580,13 +595,25 @@ exports.OptionsPositionEvent = {
|
|
|
580
595
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
581
596
|
continue;
|
|
582
597
|
}
|
|
583
|
-
// Log structured error details and rethrow
|
|
584
|
-
|
|
585
|
-
operation
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
598
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
599
|
+
if (isConnectionError) {
|
|
600
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
601
|
+
operation: 'createManyOptionsPositionEvent',
|
|
602
|
+
model: 'OptionsPositionEvent',
|
|
603
|
+
error: String(error),
|
|
604
|
+
isRetryable: true,
|
|
605
|
+
transient: true,
|
|
606
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
else {
|
|
610
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
611
|
+
operation: 'createManyOptionsPositionEvent',
|
|
612
|
+
model: 'OptionsPositionEvent',
|
|
613
|
+
error: String(error),
|
|
614
|
+
isRetryable: false,
|
|
615
|
+
});
|
|
616
|
+
}
|
|
590
617
|
throw error;
|
|
591
618
|
}
|
|
592
619
|
}
|
|
@@ -1814,14 +1841,27 @@ exports.OptionsPositionEvent = {
|
|
|
1814
1841
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1815
1842
|
continue;
|
|
1816
1843
|
}
|
|
1817
|
-
// Log structured error details and rethrow
|
|
1818
|
-
|
|
1819
|
-
operation
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1844
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1845
|
+
if (isConnectionError) {
|
|
1846
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
1847
|
+
operation: 'updateOneOptionsPositionEvent',
|
|
1848
|
+
model: 'OptionsPositionEvent',
|
|
1849
|
+
error: String(error),
|
|
1850
|
+
recordId: props.id,
|
|
1851
|
+
isRetryable: true,
|
|
1852
|
+
transient: true,
|
|
1853
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1856
|
+
else {
|
|
1857
|
+
logger_1.logger.error("Database update operation failed", {
|
|
1858
|
+
operation: 'updateOneOptionsPositionEvent',
|
|
1859
|
+
model: 'OptionsPositionEvent',
|
|
1860
|
+
error: String(error),
|
|
1861
|
+
recordId: props.id,
|
|
1862
|
+
isRetryable: false,
|
|
1863
|
+
});
|
|
1864
|
+
}
|
|
1825
1865
|
throw error;
|
|
1826
1866
|
}
|
|
1827
1867
|
}
|
|
@@ -3326,14 +3366,27 @@ exports.OptionsPositionEvent = {
|
|
|
3326
3366
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
3327
3367
|
continue;
|
|
3328
3368
|
}
|
|
3329
|
-
// Log structured error details and rethrow
|
|
3330
|
-
|
|
3331
|
-
operation
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3369
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
3370
|
+
if (isConnectionError) {
|
|
3371
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
3372
|
+
operation: 'upsertOneOptionsPositionEvent',
|
|
3373
|
+
model: 'OptionsPositionEvent',
|
|
3374
|
+
error: String(error),
|
|
3375
|
+
recordId: props.id,
|
|
3376
|
+
isRetryable: true,
|
|
3377
|
+
transient: true,
|
|
3378
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
3379
|
+
});
|
|
3380
|
+
}
|
|
3381
|
+
else {
|
|
3382
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
3383
|
+
operation: 'upsertOneOptionsPositionEvent',
|
|
3384
|
+
model: 'OptionsPositionEvent',
|
|
3385
|
+
error: String(error),
|
|
3386
|
+
recordId: props.id,
|
|
3387
|
+
isRetryable: false,
|
|
3388
|
+
});
|
|
3389
|
+
}
|
|
3337
3390
|
throw error;
|
|
3338
3391
|
}
|
|
3339
3392
|
}
|
|
@@ -4559,13 +4612,25 @@ exports.OptionsPositionEvent = {
|
|
|
4559
4612
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4560
4613
|
continue;
|
|
4561
4614
|
}
|
|
4562
|
-
// Log structured error details and rethrow
|
|
4563
|
-
|
|
4564
|
-
operation
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4615
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4616
|
+
if (isConnectionError) {
|
|
4617
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
4618
|
+
operation: 'updateManyOptionsPositionEvent',
|
|
4619
|
+
model: 'OptionsPositionEvent',
|
|
4620
|
+
error: String(error),
|
|
4621
|
+
isRetryable: true,
|
|
4622
|
+
transient: true,
|
|
4623
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4624
|
+
});
|
|
4625
|
+
}
|
|
4626
|
+
else {
|
|
4627
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
4628
|
+
operation: 'updateManyOptionsPositionEvent',
|
|
4629
|
+
model: 'OptionsPositionEvent',
|
|
4630
|
+
error: String(error),
|
|
4631
|
+
isRetryable: false,
|
|
4632
|
+
});
|
|
4633
|
+
}
|
|
4569
4634
|
throw error;
|
|
4570
4635
|
}
|
|
4571
4636
|
}
|
|
@@ -4688,14 +4753,27 @@ exports.OptionsPositionEvent = {
|
|
|
4688
4753
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4689
4754
|
continue;
|
|
4690
4755
|
}
|
|
4691
|
-
// Log structured error details and rethrow
|
|
4692
|
-
|
|
4693
|
-
operation
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4756
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4757
|
+
if (isConnectionError) {
|
|
4758
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
4759
|
+
operation: 'deleteOneOptionsPositionEvent',
|
|
4760
|
+
model: 'OptionsPositionEvent',
|
|
4761
|
+
error: String(error),
|
|
4762
|
+
recordId: props.id,
|
|
4763
|
+
isRetryable: true,
|
|
4764
|
+
transient: true,
|
|
4765
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4766
|
+
});
|
|
4767
|
+
}
|
|
4768
|
+
else {
|
|
4769
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
4770
|
+
operation: 'deleteOneOptionsPositionEvent',
|
|
4771
|
+
model: 'OptionsPositionEvent',
|
|
4772
|
+
error: String(error),
|
|
4773
|
+
recordId: props.id,
|
|
4774
|
+
isRetryable: false,
|
|
4775
|
+
});
|
|
4776
|
+
}
|
|
4699
4777
|
throw error;
|
|
4700
4778
|
}
|
|
4701
4779
|
}
|
|
@@ -4794,13 +4872,25 @@ exports.OptionsPositionEvent = {
|
|
|
4794
4872
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4795
4873
|
continue;
|
|
4796
4874
|
}
|
|
4797
|
-
// Log structured error details and rethrow
|
|
4798
|
-
|
|
4799
|
-
operation
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4875
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4876
|
+
if (isConnectionError) {
|
|
4877
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
4878
|
+
operation: 'getOptionsPositionEvent',
|
|
4879
|
+
model: 'OptionsPositionEvent',
|
|
4880
|
+
error: String(error),
|
|
4881
|
+
isRetryable: true,
|
|
4882
|
+
transient: true,
|
|
4883
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4884
|
+
});
|
|
4885
|
+
}
|
|
4886
|
+
else {
|
|
4887
|
+
logger_1.logger.error("Database get operation failed", {
|
|
4888
|
+
operation: 'getOptionsPositionEvent',
|
|
4889
|
+
model: 'OptionsPositionEvent',
|
|
4890
|
+
error: String(error),
|
|
4891
|
+
isRetryable: false,
|
|
4892
|
+
});
|
|
4893
|
+
}
|
|
4804
4894
|
throw error;
|
|
4805
4895
|
}
|
|
4806
4896
|
}
|
|
@@ -4887,13 +4977,25 @@ exports.OptionsPositionEvent = {
|
|
|
4887
4977
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4888
4978
|
continue;
|
|
4889
4979
|
}
|
|
4890
|
-
// Log structured error details and rethrow
|
|
4891
|
-
|
|
4892
|
-
operation
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4980
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4981
|
+
if (isConnectionError) {
|
|
4982
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
4983
|
+
operation: 'getAllOptionsPositionEvent',
|
|
4984
|
+
model: 'OptionsPositionEvent',
|
|
4985
|
+
error: String(error),
|
|
4986
|
+
isRetryable: true,
|
|
4987
|
+
transient: true,
|
|
4988
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4989
|
+
});
|
|
4990
|
+
}
|
|
4991
|
+
else {
|
|
4992
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
4993
|
+
operation: 'getAllOptionsPositionEvent',
|
|
4994
|
+
model: 'OptionsPositionEvent',
|
|
4995
|
+
error: String(error),
|
|
4996
|
+
isRetryable: false,
|
|
4997
|
+
});
|
|
4998
|
+
}
|
|
4897
4999
|
throw error;
|
|
4898
5000
|
}
|
|
4899
5001
|
}
|
|
@@ -5004,13 +5106,25 @@ exports.OptionsPositionEvent = {
|
|
|
5004
5106
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
5005
5107
|
continue;
|
|
5006
5108
|
}
|
|
5007
|
-
// Log structured error details and rethrow
|
|
5008
|
-
|
|
5009
|
-
operation
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5109
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
5110
|
+
if (isConnectionError) {
|
|
5111
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
5112
|
+
operation: 'findManyOptionsPositionEvent',
|
|
5113
|
+
model: 'OptionsPositionEvent',
|
|
5114
|
+
error: String(error),
|
|
5115
|
+
isRetryable: true,
|
|
5116
|
+
transient: true,
|
|
5117
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
5118
|
+
});
|
|
5119
|
+
}
|
|
5120
|
+
else {
|
|
5121
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
5122
|
+
operation: 'findManyOptionsPositionEvent',
|
|
5123
|
+
model: 'OptionsPositionEvent',
|
|
5124
|
+
error: String(error),
|
|
5125
|
+
isRetryable: false,
|
|
5126
|
+
});
|
|
5127
|
+
}
|
|
5014
5128
|
throw error;
|
|
5015
5129
|
}
|
|
5016
5130
|
}
|
|
@@ -662,13 +662,28 @@ exports.OptionsTradeExecution = {
|
|
|
662
662
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
663
663
|
continue;
|
|
664
664
|
}
|
|
665
|
-
// Log structured error details and rethrow
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
665
|
+
// Log structured error details and rethrow.
|
|
666
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
667
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
668
|
+
// from true defects.
|
|
669
|
+
if (isConnectionError) {
|
|
670
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
671
|
+
operation: 'createOneOptionsTradeExecution',
|
|
672
|
+
model: 'OptionsTradeExecution',
|
|
673
|
+
error: String(error),
|
|
674
|
+
isRetryable: true,
|
|
675
|
+
transient: true,
|
|
676
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
else {
|
|
680
|
+
logger_1.logger.error("Database create operation failed", {
|
|
681
|
+
operation: 'createOneOptionsTradeExecution',
|
|
682
|
+
model: 'OptionsTradeExecution',
|
|
683
|
+
error: String(error),
|
|
684
|
+
isRetryable: false,
|
|
685
|
+
});
|
|
686
|
+
}
|
|
672
687
|
throw error;
|
|
673
688
|
}
|
|
674
689
|
}
|
|
@@ -811,13 +826,25 @@ exports.OptionsTradeExecution = {
|
|
|
811
826
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
812
827
|
continue;
|
|
813
828
|
}
|
|
814
|
-
// Log structured error details and rethrow
|
|
815
|
-
|
|
816
|
-
operation
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
829
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
830
|
+
if (isConnectionError) {
|
|
831
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
832
|
+
operation: 'createManyOptionsTradeExecution',
|
|
833
|
+
model: 'OptionsTradeExecution',
|
|
834
|
+
error: String(error),
|
|
835
|
+
isRetryable: true,
|
|
836
|
+
transient: true,
|
|
837
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
else {
|
|
841
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
842
|
+
operation: 'createManyOptionsTradeExecution',
|
|
843
|
+
model: 'OptionsTradeExecution',
|
|
844
|
+
error: String(error),
|
|
845
|
+
isRetryable: false,
|
|
846
|
+
});
|
|
847
|
+
}
|
|
821
848
|
throw error;
|
|
822
849
|
}
|
|
823
850
|
}
|
|
@@ -2527,14 +2554,27 @@ exports.OptionsTradeExecution = {
|
|
|
2527
2554
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2528
2555
|
continue;
|
|
2529
2556
|
}
|
|
2530
|
-
// Log structured error details and rethrow
|
|
2531
|
-
|
|
2532
|
-
operation
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2557
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2558
|
+
if (isConnectionError) {
|
|
2559
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
2560
|
+
operation: 'updateOneOptionsTradeExecution',
|
|
2561
|
+
model: 'OptionsTradeExecution',
|
|
2562
|
+
error: String(error),
|
|
2563
|
+
recordId: props.id,
|
|
2564
|
+
isRetryable: true,
|
|
2565
|
+
transient: true,
|
|
2566
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
else {
|
|
2570
|
+
logger_1.logger.error("Database update operation failed", {
|
|
2571
|
+
operation: 'updateOneOptionsTradeExecution',
|
|
2572
|
+
model: 'OptionsTradeExecution',
|
|
2573
|
+
error: String(error),
|
|
2574
|
+
recordId: props.id,
|
|
2575
|
+
isRetryable: false,
|
|
2576
|
+
});
|
|
2577
|
+
}
|
|
2538
2578
|
throw error;
|
|
2539
2579
|
}
|
|
2540
2580
|
}
|
|
@@ -4676,14 +4716,27 @@ exports.OptionsTradeExecution = {
|
|
|
4676
4716
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4677
4717
|
continue;
|
|
4678
4718
|
}
|
|
4679
|
-
// Log structured error details and rethrow
|
|
4680
|
-
|
|
4681
|
-
operation
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4719
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4720
|
+
if (isConnectionError) {
|
|
4721
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
4722
|
+
operation: 'upsertOneOptionsTradeExecution',
|
|
4723
|
+
model: 'OptionsTradeExecution',
|
|
4724
|
+
error: String(error),
|
|
4725
|
+
recordId: props.id,
|
|
4726
|
+
isRetryable: true,
|
|
4727
|
+
transient: true,
|
|
4728
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4729
|
+
});
|
|
4730
|
+
}
|
|
4731
|
+
else {
|
|
4732
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
4733
|
+
operation: 'upsertOneOptionsTradeExecution',
|
|
4734
|
+
model: 'OptionsTradeExecution',
|
|
4735
|
+
error: String(error),
|
|
4736
|
+
recordId: props.id,
|
|
4737
|
+
isRetryable: false,
|
|
4738
|
+
});
|
|
4739
|
+
}
|
|
4687
4740
|
throw error;
|
|
4688
4741
|
}
|
|
4689
4742
|
}
|
|
@@ -6391,13 +6444,25 @@ exports.OptionsTradeExecution = {
|
|
|
6391
6444
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6392
6445
|
continue;
|
|
6393
6446
|
}
|
|
6394
|
-
// Log structured error details and rethrow
|
|
6395
|
-
|
|
6396
|
-
operation
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6447
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6448
|
+
if (isConnectionError) {
|
|
6449
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
6450
|
+
operation: 'updateManyOptionsTradeExecution',
|
|
6451
|
+
model: 'OptionsTradeExecution',
|
|
6452
|
+
error: String(error),
|
|
6453
|
+
isRetryable: true,
|
|
6454
|
+
transient: true,
|
|
6455
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6456
|
+
});
|
|
6457
|
+
}
|
|
6458
|
+
else {
|
|
6459
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
6460
|
+
operation: 'updateManyOptionsTradeExecution',
|
|
6461
|
+
model: 'OptionsTradeExecution',
|
|
6462
|
+
error: String(error),
|
|
6463
|
+
isRetryable: false,
|
|
6464
|
+
});
|
|
6465
|
+
}
|
|
6401
6466
|
throw error;
|
|
6402
6467
|
}
|
|
6403
6468
|
}
|
|
@@ -6520,14 +6585,27 @@ exports.OptionsTradeExecution = {
|
|
|
6520
6585
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6521
6586
|
continue;
|
|
6522
6587
|
}
|
|
6523
|
-
// Log structured error details and rethrow
|
|
6524
|
-
|
|
6525
|
-
operation
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6588
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6589
|
+
if (isConnectionError) {
|
|
6590
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
6591
|
+
operation: 'deleteOneOptionsTradeExecution',
|
|
6592
|
+
model: 'OptionsTradeExecution',
|
|
6593
|
+
error: String(error),
|
|
6594
|
+
recordId: props.id,
|
|
6595
|
+
isRetryable: true,
|
|
6596
|
+
transient: true,
|
|
6597
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6598
|
+
});
|
|
6599
|
+
}
|
|
6600
|
+
else {
|
|
6601
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
6602
|
+
operation: 'deleteOneOptionsTradeExecution',
|
|
6603
|
+
model: 'OptionsTradeExecution',
|
|
6604
|
+
error: String(error),
|
|
6605
|
+
recordId: props.id,
|
|
6606
|
+
isRetryable: false,
|
|
6607
|
+
});
|
|
6608
|
+
}
|
|
6531
6609
|
throw error;
|
|
6532
6610
|
}
|
|
6533
6611
|
}
|
|
@@ -6635,13 +6713,25 @@ exports.OptionsTradeExecution = {
|
|
|
6635
6713
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6636
6714
|
continue;
|
|
6637
6715
|
}
|
|
6638
|
-
// Log structured error details and rethrow
|
|
6639
|
-
|
|
6640
|
-
operation
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6716
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6717
|
+
if (isConnectionError) {
|
|
6718
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
6719
|
+
operation: 'getOptionsTradeExecution',
|
|
6720
|
+
model: 'OptionsTradeExecution',
|
|
6721
|
+
error: String(error),
|
|
6722
|
+
isRetryable: true,
|
|
6723
|
+
transient: true,
|
|
6724
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6725
|
+
});
|
|
6726
|
+
}
|
|
6727
|
+
else {
|
|
6728
|
+
logger_1.logger.error("Database get operation failed", {
|
|
6729
|
+
operation: 'getOptionsTradeExecution',
|
|
6730
|
+
model: 'OptionsTradeExecution',
|
|
6731
|
+
error: String(error),
|
|
6732
|
+
isRetryable: false,
|
|
6733
|
+
});
|
|
6734
|
+
}
|
|
6645
6735
|
throw error;
|
|
6646
6736
|
}
|
|
6647
6737
|
}
|
|
@@ -6728,13 +6818,25 @@ exports.OptionsTradeExecution = {
|
|
|
6728
6818
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6729
6819
|
continue;
|
|
6730
6820
|
}
|
|
6731
|
-
// Log structured error details and rethrow
|
|
6732
|
-
|
|
6733
|
-
operation
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6821
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6822
|
+
if (isConnectionError) {
|
|
6823
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
6824
|
+
operation: 'getAllOptionsTradeExecution',
|
|
6825
|
+
model: 'OptionsTradeExecution',
|
|
6826
|
+
error: String(error),
|
|
6827
|
+
isRetryable: true,
|
|
6828
|
+
transient: true,
|
|
6829
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6830
|
+
});
|
|
6831
|
+
}
|
|
6832
|
+
else {
|
|
6833
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
6834
|
+
operation: 'getAllOptionsTradeExecution',
|
|
6835
|
+
model: 'OptionsTradeExecution',
|
|
6836
|
+
error: String(error),
|
|
6837
|
+
isRetryable: false,
|
|
6838
|
+
});
|
|
6839
|
+
}
|
|
6738
6840
|
throw error;
|
|
6739
6841
|
}
|
|
6740
6842
|
}
|
|
@@ -6854,13 +6956,25 @@ exports.OptionsTradeExecution = {
|
|
|
6854
6956
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6855
6957
|
continue;
|
|
6856
6958
|
}
|
|
6857
|
-
// Log structured error details and rethrow
|
|
6858
|
-
|
|
6859
|
-
operation
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6959
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6960
|
+
if (isConnectionError) {
|
|
6961
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
6962
|
+
operation: 'findManyOptionsTradeExecution',
|
|
6963
|
+
model: 'OptionsTradeExecution',
|
|
6964
|
+
error: String(error),
|
|
6965
|
+
isRetryable: true,
|
|
6966
|
+
transient: true,
|
|
6967
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6968
|
+
});
|
|
6969
|
+
}
|
|
6970
|
+
else {
|
|
6971
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
6972
|
+
operation: 'findManyOptionsTradeExecution',
|
|
6973
|
+
model: 'OptionsTradeExecution',
|
|
6974
|
+
error: String(error),
|
|
6975
|
+
isRetryable: false,
|
|
6976
|
+
});
|
|
6977
|
+
}
|
|
6864
6978
|
throw error;
|
|
6865
6979
|
}
|
|
6866
6980
|
}
|