@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
|
@@ -136,13 +136,28 @@ export const AnalyticsSnapshot = {
|
|
|
136
136
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
137
137
|
continue;
|
|
138
138
|
}
|
|
139
|
-
// Log structured error details and rethrow
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
139
|
+
// Log structured error details and rethrow.
|
|
140
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
141
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
142
|
+
// from true defects.
|
|
143
|
+
if (isConnectionError) {
|
|
144
|
+
logger.warn("Database create operation failed (transient after retries)", {
|
|
145
|
+
operation: 'createOneAnalyticsSnapshot',
|
|
146
|
+
model: 'AnalyticsSnapshot',
|
|
147
|
+
error: String(error),
|
|
148
|
+
isRetryable: true,
|
|
149
|
+
transient: true,
|
|
150
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
logger.error("Database create operation failed", {
|
|
155
|
+
operation: 'createOneAnalyticsSnapshot',
|
|
156
|
+
model: 'AnalyticsSnapshot',
|
|
157
|
+
error: String(error),
|
|
158
|
+
isRetryable: false,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
146
161
|
throw error;
|
|
147
162
|
}
|
|
148
163
|
}
|
|
@@ -263,13 +278,25 @@ export const AnalyticsSnapshot = {
|
|
|
263
278
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
264
279
|
continue;
|
|
265
280
|
}
|
|
266
|
-
// Log structured error details and rethrow
|
|
267
|
-
|
|
268
|
-
operation
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
281
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
282
|
+
if (isConnectionError) {
|
|
283
|
+
logger.warn("Database createMany operation failed (transient after retries)", {
|
|
284
|
+
operation: 'createManyAnalyticsSnapshot',
|
|
285
|
+
model: 'AnalyticsSnapshot',
|
|
286
|
+
error: String(error),
|
|
287
|
+
isRetryable: true,
|
|
288
|
+
transient: true,
|
|
289
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
logger.error("Database createMany operation failed", {
|
|
294
|
+
operation: 'createManyAnalyticsSnapshot',
|
|
295
|
+
model: 'AnalyticsSnapshot',
|
|
296
|
+
error: String(error),
|
|
297
|
+
isRetryable: false,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
273
300
|
throw error;
|
|
274
301
|
}
|
|
275
302
|
}
|
|
@@ -409,14 +436,27 @@ export const AnalyticsSnapshot = {
|
|
|
409
436
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
410
437
|
continue;
|
|
411
438
|
}
|
|
412
|
-
// Log structured error details and rethrow
|
|
413
|
-
|
|
414
|
-
operation
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
439
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
440
|
+
if (isConnectionError) {
|
|
441
|
+
logger.warn("Database update operation failed (transient after retries)", {
|
|
442
|
+
operation: 'updateOneAnalyticsSnapshot',
|
|
443
|
+
model: 'AnalyticsSnapshot',
|
|
444
|
+
error: String(error),
|
|
445
|
+
recordId: props.id,
|
|
446
|
+
isRetryable: true,
|
|
447
|
+
transient: true,
|
|
448
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
logger.error("Database update operation failed", {
|
|
453
|
+
operation: 'updateOneAnalyticsSnapshot',
|
|
454
|
+
model: 'AnalyticsSnapshot',
|
|
455
|
+
error: String(error),
|
|
456
|
+
recordId: props.id,
|
|
457
|
+
isRetryable: false,
|
|
458
|
+
});
|
|
459
|
+
}
|
|
420
460
|
throw error;
|
|
421
461
|
}
|
|
422
462
|
}
|
|
@@ -556,14 +596,27 @@ export const AnalyticsSnapshot = {
|
|
|
556
596
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
557
597
|
continue;
|
|
558
598
|
}
|
|
559
|
-
// Log structured error details and rethrow
|
|
560
|
-
|
|
561
|
-
operation
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
599
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
600
|
+
if (isConnectionError) {
|
|
601
|
+
logger.warn("Database upsert operation failed (transient after retries)", {
|
|
602
|
+
operation: 'upsertOneAnalyticsSnapshot',
|
|
603
|
+
model: 'AnalyticsSnapshot',
|
|
604
|
+
error: String(error),
|
|
605
|
+
recordId: props.id,
|
|
606
|
+
isRetryable: true,
|
|
607
|
+
transient: true,
|
|
608
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
else {
|
|
612
|
+
logger.error("Database upsert operation failed", {
|
|
613
|
+
operation: 'upsertOneAnalyticsSnapshot',
|
|
614
|
+
model: 'AnalyticsSnapshot',
|
|
615
|
+
error: String(error),
|
|
616
|
+
recordId: props.id,
|
|
617
|
+
isRetryable: false,
|
|
618
|
+
});
|
|
619
|
+
}
|
|
567
620
|
throw error;
|
|
568
621
|
}
|
|
569
622
|
}
|
|
@@ -701,13 +754,25 @@ export const AnalyticsSnapshot = {
|
|
|
701
754
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
702
755
|
continue;
|
|
703
756
|
}
|
|
704
|
-
// Log structured error details and rethrow
|
|
705
|
-
|
|
706
|
-
operation
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
757
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
758
|
+
if (isConnectionError) {
|
|
759
|
+
logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
760
|
+
operation: 'updateManyAnalyticsSnapshot',
|
|
761
|
+
model: 'AnalyticsSnapshot',
|
|
762
|
+
error: String(error),
|
|
763
|
+
isRetryable: true,
|
|
764
|
+
transient: true,
|
|
765
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
else {
|
|
769
|
+
logger.error("Database updateMany operation failed", {
|
|
770
|
+
operation: 'updateManyAnalyticsSnapshot',
|
|
771
|
+
model: 'AnalyticsSnapshot',
|
|
772
|
+
error: String(error),
|
|
773
|
+
isRetryable: false,
|
|
774
|
+
});
|
|
775
|
+
}
|
|
711
776
|
throw error;
|
|
712
777
|
}
|
|
713
778
|
}
|
|
@@ -829,14 +894,27 @@ export const AnalyticsSnapshot = {
|
|
|
829
894
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
830
895
|
continue;
|
|
831
896
|
}
|
|
832
|
-
// Log structured error details and rethrow
|
|
833
|
-
|
|
834
|
-
operation
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
897
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
898
|
+
if (isConnectionError) {
|
|
899
|
+
logger.warn("Database delete operation failed (transient after retries)", {
|
|
900
|
+
operation: 'deleteOneAnalyticsSnapshot',
|
|
901
|
+
model: 'AnalyticsSnapshot',
|
|
902
|
+
error: String(error),
|
|
903
|
+
recordId: props.id,
|
|
904
|
+
isRetryable: true,
|
|
905
|
+
transient: true,
|
|
906
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
else {
|
|
910
|
+
logger.error("Database delete operation failed", {
|
|
911
|
+
operation: 'deleteOneAnalyticsSnapshot',
|
|
912
|
+
model: 'AnalyticsSnapshot',
|
|
913
|
+
error: String(error),
|
|
914
|
+
recordId: props.id,
|
|
915
|
+
isRetryable: false,
|
|
916
|
+
});
|
|
917
|
+
}
|
|
840
918
|
throw error;
|
|
841
919
|
}
|
|
842
920
|
}
|
|
@@ -934,13 +1012,25 @@ export const AnalyticsSnapshot = {
|
|
|
934
1012
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
935
1013
|
continue;
|
|
936
1014
|
}
|
|
937
|
-
// Log structured error details and rethrow
|
|
938
|
-
|
|
939
|
-
operation
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1015
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1016
|
+
if (isConnectionError) {
|
|
1017
|
+
logger.warn("Database get operation failed (transient after retries)", {
|
|
1018
|
+
operation: 'getAnalyticsSnapshot',
|
|
1019
|
+
model: 'AnalyticsSnapshot',
|
|
1020
|
+
error: String(error),
|
|
1021
|
+
isRetryable: true,
|
|
1022
|
+
transient: true,
|
|
1023
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
else {
|
|
1027
|
+
logger.error("Database get operation failed", {
|
|
1028
|
+
operation: 'getAnalyticsSnapshot',
|
|
1029
|
+
model: 'AnalyticsSnapshot',
|
|
1030
|
+
error: String(error),
|
|
1031
|
+
isRetryable: false,
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
944
1034
|
throw error;
|
|
945
1035
|
}
|
|
946
1036
|
}
|
|
@@ -1026,13 +1116,25 @@ export const AnalyticsSnapshot = {
|
|
|
1026
1116
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1027
1117
|
continue;
|
|
1028
1118
|
}
|
|
1029
|
-
// Log structured error details and rethrow
|
|
1030
|
-
|
|
1031
|
-
operation
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1119
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1120
|
+
if (isConnectionError) {
|
|
1121
|
+
logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1122
|
+
operation: 'getAllAnalyticsSnapshot',
|
|
1123
|
+
model: 'AnalyticsSnapshot',
|
|
1124
|
+
error: String(error),
|
|
1125
|
+
isRetryable: true,
|
|
1126
|
+
transient: true,
|
|
1127
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
else {
|
|
1131
|
+
logger.error("Database getAll operation failed", {
|
|
1132
|
+
operation: 'getAllAnalyticsSnapshot',
|
|
1133
|
+
model: 'AnalyticsSnapshot',
|
|
1134
|
+
error: String(error),
|
|
1135
|
+
isRetryable: false,
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1036
1138
|
throw error;
|
|
1037
1139
|
}
|
|
1038
1140
|
}
|
|
@@ -1142,13 +1244,25 @@ export const AnalyticsSnapshot = {
|
|
|
1142
1244
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1143
1245
|
continue;
|
|
1144
1246
|
}
|
|
1145
|
-
// Log structured error details and rethrow
|
|
1146
|
-
|
|
1147
|
-
operation
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1247
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1248
|
+
if (isConnectionError) {
|
|
1249
|
+
logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1250
|
+
operation: 'findManyAnalyticsSnapshot',
|
|
1251
|
+
model: 'AnalyticsSnapshot',
|
|
1252
|
+
error: String(error),
|
|
1253
|
+
isRetryable: true,
|
|
1254
|
+
transient: true,
|
|
1255
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
else {
|
|
1259
|
+
logger.error("Database findMany operation failed", {
|
|
1260
|
+
operation: 'findManyAnalyticsSnapshot',
|
|
1261
|
+
model: 'AnalyticsSnapshot',
|
|
1262
|
+
error: String(error),
|
|
1263
|
+
isRetryable: false,
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
1152
1266
|
throw error;
|
|
1153
1267
|
}
|
|
1154
1268
|
}
|
package/esm/Asset.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Asset.d.ts","sourceRoot":"","sources":["../../src/Asset.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAuEpG,eAAO,MAAM,KAAK;IAEhB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Asset.d.ts","sourceRoot":"","sources":["../../src/Asset.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAuEpG,eAAO,MAAM,KAAK;IAEhB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IAmT5G;;;;;;;OAOG;sBACqB,SAAS,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,YAAY;QAAE,cAAc,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAoMvK;;;;;;OAMG;kBACiB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IAmkB1G;;;;;;OAMG;kBACiB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IAkuB1G;;;;;;OAMG;sBACqB,SAAS,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAikB/H;;;;;;OAMG;kBACiB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IAqJ1G;;;;;;;OAOG;eACc,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;IA0HpJ;;;;;OAKG;0BACyB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC;IA6GjG;;;;;;;OAOG;oBACmB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC;CA0I5J,CAAC"}
|