@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/EquityBar.cjs
CHANGED
|
@@ -150,13 +150,28 @@ exports.EquityBar = {
|
|
|
150
150
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
151
151
|
continue;
|
|
152
152
|
}
|
|
153
|
-
// Log structured error details and rethrow
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
153
|
+
// Log structured error details and rethrow.
|
|
154
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
155
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
156
|
+
// from true defects.
|
|
157
|
+
if (isConnectionError) {
|
|
158
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
159
|
+
operation: 'createOneEquityBar',
|
|
160
|
+
model: 'EquityBar',
|
|
161
|
+
error: String(error),
|
|
162
|
+
isRetryable: true,
|
|
163
|
+
transient: true,
|
|
164
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
logger_1.logger.error("Database create operation failed", {
|
|
169
|
+
operation: 'createOneEquityBar',
|
|
170
|
+
model: 'EquityBar',
|
|
171
|
+
error: String(error),
|
|
172
|
+
isRetryable: false,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
160
175
|
throw error;
|
|
161
176
|
}
|
|
162
177
|
}
|
|
@@ -285,13 +300,25 @@ exports.EquityBar = {
|
|
|
285
300
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
286
301
|
continue;
|
|
287
302
|
}
|
|
288
|
-
// Log structured error details and rethrow
|
|
289
|
-
|
|
290
|
-
operation
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
303
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
304
|
+
if (isConnectionError) {
|
|
305
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
306
|
+
operation: 'createManyEquityBar',
|
|
307
|
+
model: 'EquityBar',
|
|
308
|
+
error: String(error),
|
|
309
|
+
isRetryable: true,
|
|
310
|
+
transient: true,
|
|
311
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
316
|
+
operation: 'createManyEquityBar',
|
|
317
|
+
model: 'EquityBar',
|
|
318
|
+
error: String(error),
|
|
319
|
+
isRetryable: false,
|
|
320
|
+
});
|
|
321
|
+
}
|
|
295
322
|
throw error;
|
|
296
323
|
}
|
|
297
324
|
}
|
|
@@ -452,14 +479,27 @@ exports.EquityBar = {
|
|
|
452
479
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
453
480
|
continue;
|
|
454
481
|
}
|
|
455
|
-
// Log structured error details and rethrow
|
|
456
|
-
|
|
457
|
-
operation
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
482
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
483
|
+
if (isConnectionError) {
|
|
484
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
485
|
+
operation: 'updateOneEquityBar',
|
|
486
|
+
model: 'EquityBar',
|
|
487
|
+
error: String(error),
|
|
488
|
+
recordId: props.id,
|
|
489
|
+
isRetryable: true,
|
|
490
|
+
transient: true,
|
|
491
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
else {
|
|
495
|
+
logger_1.logger.error("Database update operation failed", {
|
|
496
|
+
operation: 'updateOneEquityBar',
|
|
497
|
+
model: 'EquityBar',
|
|
498
|
+
error: String(error),
|
|
499
|
+
recordId: props.id,
|
|
500
|
+
isRetryable: false,
|
|
501
|
+
});
|
|
502
|
+
}
|
|
463
503
|
throw error;
|
|
464
504
|
}
|
|
465
505
|
}
|
|
@@ -634,14 +674,27 @@ exports.EquityBar = {
|
|
|
634
674
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
635
675
|
continue;
|
|
636
676
|
}
|
|
637
|
-
// Log structured error details and rethrow
|
|
638
|
-
|
|
639
|
-
operation
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
677
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
678
|
+
if (isConnectionError) {
|
|
679
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
680
|
+
operation: 'upsertOneEquityBar',
|
|
681
|
+
model: 'EquityBar',
|
|
682
|
+
error: String(error),
|
|
683
|
+
recordId: props.id,
|
|
684
|
+
isRetryable: true,
|
|
685
|
+
transient: true,
|
|
686
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
else {
|
|
690
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
691
|
+
operation: 'upsertOneEquityBar',
|
|
692
|
+
model: 'EquityBar',
|
|
693
|
+
error: String(error),
|
|
694
|
+
recordId: props.id,
|
|
695
|
+
isRetryable: false,
|
|
696
|
+
});
|
|
697
|
+
}
|
|
645
698
|
throw error;
|
|
646
699
|
}
|
|
647
700
|
}
|
|
@@ -800,13 +853,25 @@ exports.EquityBar = {
|
|
|
800
853
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
801
854
|
continue;
|
|
802
855
|
}
|
|
803
|
-
// Log structured error details and rethrow
|
|
804
|
-
|
|
805
|
-
operation
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
856
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
857
|
+
if (isConnectionError) {
|
|
858
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
859
|
+
operation: 'updateManyEquityBar',
|
|
860
|
+
model: 'EquityBar',
|
|
861
|
+
error: String(error),
|
|
862
|
+
isRetryable: true,
|
|
863
|
+
transient: true,
|
|
864
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
else {
|
|
868
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
869
|
+
operation: 'updateManyEquityBar',
|
|
870
|
+
model: 'EquityBar',
|
|
871
|
+
error: String(error),
|
|
872
|
+
isRetryable: false,
|
|
873
|
+
});
|
|
874
|
+
}
|
|
810
875
|
throw error;
|
|
811
876
|
}
|
|
812
877
|
}
|
|
@@ -929,14 +994,27 @@ exports.EquityBar = {
|
|
|
929
994
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
930
995
|
continue;
|
|
931
996
|
}
|
|
932
|
-
// Log structured error details and rethrow
|
|
933
|
-
|
|
934
|
-
operation
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
997
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
998
|
+
if (isConnectionError) {
|
|
999
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1000
|
+
operation: 'deleteOneEquityBar',
|
|
1001
|
+
model: 'EquityBar',
|
|
1002
|
+
error: String(error),
|
|
1003
|
+
recordId: props.id,
|
|
1004
|
+
isRetryable: true,
|
|
1005
|
+
transient: true,
|
|
1006
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
else {
|
|
1010
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1011
|
+
operation: 'deleteOneEquityBar',
|
|
1012
|
+
model: 'EquityBar',
|
|
1013
|
+
error: String(error),
|
|
1014
|
+
recordId: props.id,
|
|
1015
|
+
isRetryable: false,
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
940
1018
|
throw error;
|
|
941
1019
|
}
|
|
942
1020
|
}
|
|
@@ -1035,13 +1113,25 @@ exports.EquityBar = {
|
|
|
1035
1113
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1036
1114
|
continue;
|
|
1037
1115
|
}
|
|
1038
|
-
// Log structured error details and rethrow
|
|
1039
|
-
|
|
1040
|
-
operation
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1116
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1117
|
+
if (isConnectionError) {
|
|
1118
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1119
|
+
operation: 'getEquityBar',
|
|
1120
|
+
model: 'EquityBar',
|
|
1121
|
+
error: String(error),
|
|
1122
|
+
isRetryable: true,
|
|
1123
|
+
transient: true,
|
|
1124
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
else {
|
|
1128
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1129
|
+
operation: 'getEquityBar',
|
|
1130
|
+
model: 'EquityBar',
|
|
1131
|
+
error: String(error),
|
|
1132
|
+
isRetryable: false,
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1045
1135
|
throw error;
|
|
1046
1136
|
}
|
|
1047
1137
|
}
|
|
@@ -1128,13 +1218,25 @@ exports.EquityBar = {
|
|
|
1128
1218
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1129
1219
|
continue;
|
|
1130
1220
|
}
|
|
1131
|
-
// Log structured error details and rethrow
|
|
1132
|
-
|
|
1133
|
-
operation
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1221
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1222
|
+
if (isConnectionError) {
|
|
1223
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1224
|
+
operation: 'getAllEquityBar',
|
|
1225
|
+
model: 'EquityBar',
|
|
1226
|
+
error: String(error),
|
|
1227
|
+
isRetryable: true,
|
|
1228
|
+
transient: true,
|
|
1229
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1230
|
+
});
|
|
1231
|
+
}
|
|
1232
|
+
else {
|
|
1233
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1234
|
+
operation: 'getAllEquityBar',
|
|
1235
|
+
model: 'EquityBar',
|
|
1236
|
+
error: String(error),
|
|
1237
|
+
isRetryable: false,
|
|
1238
|
+
});
|
|
1239
|
+
}
|
|
1138
1240
|
throw error;
|
|
1139
1241
|
}
|
|
1140
1242
|
}
|
|
@@ -1245,13 +1347,25 @@ exports.EquityBar = {
|
|
|
1245
1347
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1246
1348
|
continue;
|
|
1247
1349
|
}
|
|
1248
|
-
// Log structured error details and rethrow
|
|
1249
|
-
|
|
1250
|
-
operation
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1350
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1351
|
+
if (isConnectionError) {
|
|
1352
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1353
|
+
operation: 'findManyEquityBar',
|
|
1354
|
+
model: 'EquityBar',
|
|
1355
|
+
error: String(error),
|
|
1356
|
+
isRetryable: true,
|
|
1357
|
+
transient: true,
|
|
1358
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
else {
|
|
1362
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1363
|
+
operation: 'findManyEquityBar',
|
|
1364
|
+
model: 'EquityBar',
|
|
1365
|
+
error: String(error),
|
|
1366
|
+
isRetryable: false,
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1255
1369
|
throw error;
|
|
1256
1370
|
}
|
|
1257
1371
|
}
|
package/Event.cjs
CHANGED
|
@@ -176,13 +176,28 @@ exports.Event = {
|
|
|
176
176
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
177
177
|
continue;
|
|
178
178
|
}
|
|
179
|
-
// Log structured error details and rethrow
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
179
|
+
// Log structured error details and rethrow.
|
|
180
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
181
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
182
|
+
// from true defects.
|
|
183
|
+
if (isConnectionError) {
|
|
184
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
185
|
+
operation: 'createOneEvent',
|
|
186
|
+
model: 'Event',
|
|
187
|
+
error: String(error),
|
|
188
|
+
isRetryable: true,
|
|
189
|
+
transient: true,
|
|
190
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
logger_1.logger.error("Database create operation failed", {
|
|
195
|
+
operation: 'createOneEvent',
|
|
196
|
+
model: 'Event',
|
|
197
|
+
error: String(error),
|
|
198
|
+
isRetryable: false,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
186
201
|
throw error;
|
|
187
202
|
}
|
|
188
203
|
}
|
|
@@ -322,13 +337,25 @@ exports.Event = {
|
|
|
322
337
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
323
338
|
continue;
|
|
324
339
|
}
|
|
325
|
-
// Log structured error details and rethrow
|
|
326
|
-
|
|
327
|
-
operation
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
340
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
341
|
+
if (isConnectionError) {
|
|
342
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
343
|
+
operation: 'createManyEvent',
|
|
344
|
+
model: 'Event',
|
|
345
|
+
error: String(error),
|
|
346
|
+
isRetryable: true,
|
|
347
|
+
transient: true,
|
|
348
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
353
|
+
operation: 'createManyEvent',
|
|
354
|
+
model: 'Event',
|
|
355
|
+
error: String(error),
|
|
356
|
+
isRetryable: false,
|
|
357
|
+
});
|
|
358
|
+
}
|
|
332
359
|
throw error;
|
|
333
360
|
}
|
|
334
361
|
}
|
|
@@ -517,14 +544,27 @@ exports.Event = {
|
|
|
517
544
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
518
545
|
continue;
|
|
519
546
|
}
|
|
520
|
-
// Log structured error details and rethrow
|
|
521
|
-
|
|
522
|
-
operation
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
547
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
548
|
+
if (isConnectionError) {
|
|
549
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
550
|
+
operation: 'updateOneEvent',
|
|
551
|
+
model: 'Event',
|
|
552
|
+
error: String(error),
|
|
553
|
+
recordId: props.id,
|
|
554
|
+
isRetryable: true,
|
|
555
|
+
transient: true,
|
|
556
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
else {
|
|
560
|
+
logger_1.logger.error("Database update operation failed", {
|
|
561
|
+
operation: 'updateOneEvent',
|
|
562
|
+
model: 'Event',
|
|
563
|
+
error: String(error),
|
|
564
|
+
recordId: props.id,
|
|
565
|
+
isRetryable: false,
|
|
566
|
+
});
|
|
567
|
+
}
|
|
528
568
|
throw error;
|
|
529
569
|
}
|
|
530
570
|
}
|
|
@@ -753,14 +793,27 @@ exports.Event = {
|
|
|
753
793
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
754
794
|
continue;
|
|
755
795
|
}
|
|
756
|
-
// Log structured error details and rethrow
|
|
757
|
-
|
|
758
|
-
operation
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
796
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
797
|
+
if (isConnectionError) {
|
|
798
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
799
|
+
operation: 'upsertOneEvent',
|
|
800
|
+
model: 'Event',
|
|
801
|
+
error: String(error),
|
|
802
|
+
recordId: props.id,
|
|
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 upsert operation failed", {
|
|
810
|
+
operation: 'upsertOneEvent',
|
|
811
|
+
model: 'Event',
|
|
812
|
+
error: String(error),
|
|
813
|
+
recordId: props.id,
|
|
814
|
+
isRetryable: false,
|
|
815
|
+
});
|
|
816
|
+
}
|
|
764
817
|
throw error;
|
|
765
818
|
}
|
|
766
819
|
}
|
|
@@ -947,13 +1000,25 @@ exports.Event = {
|
|
|
947
1000
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
948
1001
|
continue;
|
|
949
1002
|
}
|
|
950
|
-
// Log structured error details and rethrow
|
|
951
|
-
|
|
952
|
-
operation
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1003
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1004
|
+
if (isConnectionError) {
|
|
1005
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
1006
|
+
operation: 'updateManyEvent',
|
|
1007
|
+
model: 'Event',
|
|
1008
|
+
error: String(error),
|
|
1009
|
+
isRetryable: true,
|
|
1010
|
+
transient: true,
|
|
1011
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
else {
|
|
1015
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
1016
|
+
operation: 'updateManyEvent',
|
|
1017
|
+
model: 'Event',
|
|
1018
|
+
error: String(error),
|
|
1019
|
+
isRetryable: false,
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
957
1022
|
throw error;
|
|
958
1023
|
}
|
|
959
1024
|
}
|
|
@@ -1076,14 +1141,27 @@ exports.Event = {
|
|
|
1076
1141
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1077
1142
|
continue;
|
|
1078
1143
|
}
|
|
1079
|
-
// Log structured error details and rethrow
|
|
1080
|
-
|
|
1081
|
-
operation
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1144
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1145
|
+
if (isConnectionError) {
|
|
1146
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1147
|
+
operation: 'deleteOneEvent',
|
|
1148
|
+
model: 'Event',
|
|
1149
|
+
error: String(error),
|
|
1150
|
+
recordId: props.id,
|
|
1151
|
+
isRetryable: true,
|
|
1152
|
+
transient: true,
|
|
1153
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
else {
|
|
1157
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1158
|
+
operation: 'deleteOneEvent',
|
|
1159
|
+
model: 'Event',
|
|
1160
|
+
error: String(error),
|
|
1161
|
+
recordId: props.id,
|
|
1162
|
+
isRetryable: false,
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1087
1165
|
throw error;
|
|
1088
1166
|
}
|
|
1089
1167
|
}
|
|
@@ -1204,13 +1282,25 @@ exports.Event = {
|
|
|
1204
1282
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1205
1283
|
continue;
|
|
1206
1284
|
}
|
|
1207
|
-
// Log structured error details and rethrow
|
|
1208
|
-
|
|
1209
|
-
operation
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1285
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1286
|
+
if (isConnectionError) {
|
|
1287
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1288
|
+
operation: 'getEvent',
|
|
1289
|
+
model: 'Event',
|
|
1290
|
+
error: String(error),
|
|
1291
|
+
isRetryable: true,
|
|
1292
|
+
transient: true,
|
|
1293
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
else {
|
|
1297
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1298
|
+
operation: 'getEvent',
|
|
1299
|
+
model: 'Event',
|
|
1300
|
+
error: String(error),
|
|
1301
|
+
isRetryable: false,
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
1214
1304
|
throw error;
|
|
1215
1305
|
}
|
|
1216
1306
|
}
|
|
@@ -1297,13 +1387,25 @@ exports.Event = {
|
|
|
1297
1387
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1298
1388
|
continue;
|
|
1299
1389
|
}
|
|
1300
|
-
// Log structured error details and rethrow
|
|
1301
|
-
|
|
1302
|
-
operation
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1390
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1391
|
+
if (isConnectionError) {
|
|
1392
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1393
|
+
operation: 'getAllEvent',
|
|
1394
|
+
model: 'Event',
|
|
1395
|
+
error: String(error),
|
|
1396
|
+
isRetryable: true,
|
|
1397
|
+
transient: true,
|
|
1398
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1399
|
+
});
|
|
1400
|
+
}
|
|
1401
|
+
else {
|
|
1402
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1403
|
+
operation: 'getAllEvent',
|
|
1404
|
+
model: 'Event',
|
|
1405
|
+
error: String(error),
|
|
1406
|
+
isRetryable: false,
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
1307
1409
|
throw error;
|
|
1308
1410
|
}
|
|
1309
1411
|
}
|
|
@@ -1438,13 +1540,25 @@ exports.Event = {
|
|
|
1438
1540
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1439
1541
|
continue;
|
|
1440
1542
|
}
|
|
1441
|
-
// Log structured error details and rethrow
|
|
1442
|
-
|
|
1443
|
-
operation
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1543
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1544
|
+
if (isConnectionError) {
|
|
1545
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1546
|
+
operation: 'findManyEvent',
|
|
1547
|
+
model: 'Event',
|
|
1548
|
+
error: String(error),
|
|
1549
|
+
isRetryable: true,
|
|
1550
|
+
transient: true,
|
|
1551
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1552
|
+
});
|
|
1553
|
+
}
|
|
1554
|
+
else {
|
|
1555
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1556
|
+
operation: 'findManyEvent',
|
|
1557
|
+
model: 'Event',
|
|
1558
|
+
error: String(error),
|
|
1559
|
+
isRetryable: false,
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1448
1562
|
throw error;
|
|
1449
1563
|
}
|
|
1450
1564
|
}
|