@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
|
@@ -139,13 +139,28 @@ export const ConnectionHealthSnapshot = {
|
|
|
139
139
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
140
140
|
continue;
|
|
141
141
|
}
|
|
142
|
-
// Log structured error details and rethrow
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
// Log structured error details and rethrow.
|
|
143
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
144
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
145
|
+
// from true defects.
|
|
146
|
+
if (isConnectionError) {
|
|
147
|
+
logger.warn("Database create operation failed (transient after retries)", {
|
|
148
|
+
operation: 'createOneConnectionHealthSnapshot',
|
|
149
|
+
model: 'ConnectionHealthSnapshot',
|
|
150
|
+
error: String(error),
|
|
151
|
+
isRetryable: true,
|
|
152
|
+
transient: true,
|
|
153
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
logger.error("Database create operation failed", {
|
|
158
|
+
operation: 'createOneConnectionHealthSnapshot',
|
|
159
|
+
model: 'ConnectionHealthSnapshot',
|
|
160
|
+
error: String(error),
|
|
161
|
+
isRetryable: false,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
149
164
|
throw error;
|
|
150
165
|
}
|
|
151
166
|
}
|
|
@@ -268,13 +283,25 @@ export const ConnectionHealthSnapshot = {
|
|
|
268
283
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
269
284
|
continue;
|
|
270
285
|
}
|
|
271
|
-
// Log structured error details and rethrow
|
|
272
|
-
|
|
273
|
-
operation
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
286
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
287
|
+
if (isConnectionError) {
|
|
288
|
+
logger.warn("Database createMany operation failed (transient after retries)", {
|
|
289
|
+
operation: 'createManyConnectionHealthSnapshot',
|
|
290
|
+
model: 'ConnectionHealthSnapshot',
|
|
291
|
+
error: String(error),
|
|
292
|
+
isRetryable: true,
|
|
293
|
+
transient: true,
|
|
294
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
logger.error("Database createMany operation failed", {
|
|
299
|
+
operation: 'createManyConnectionHealthSnapshot',
|
|
300
|
+
model: 'ConnectionHealthSnapshot',
|
|
301
|
+
error: String(error),
|
|
302
|
+
isRetryable: false,
|
|
303
|
+
});
|
|
304
|
+
}
|
|
278
305
|
throw error;
|
|
279
306
|
}
|
|
280
307
|
}
|
|
@@ -415,14 +442,27 @@ export const ConnectionHealthSnapshot = {
|
|
|
415
442
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
416
443
|
continue;
|
|
417
444
|
}
|
|
418
|
-
// Log structured error details and rethrow
|
|
419
|
-
|
|
420
|
-
operation
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
445
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
446
|
+
if (isConnectionError) {
|
|
447
|
+
logger.warn("Database update operation failed (transient after retries)", {
|
|
448
|
+
operation: 'updateOneConnectionHealthSnapshot',
|
|
449
|
+
model: 'ConnectionHealthSnapshot',
|
|
450
|
+
error: String(error),
|
|
451
|
+
recordId: props.id,
|
|
452
|
+
isRetryable: true,
|
|
453
|
+
transient: true,
|
|
454
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
logger.error("Database update operation failed", {
|
|
459
|
+
operation: 'updateOneConnectionHealthSnapshot',
|
|
460
|
+
model: 'ConnectionHealthSnapshot',
|
|
461
|
+
error: String(error),
|
|
462
|
+
recordId: props.id,
|
|
463
|
+
isRetryable: false,
|
|
464
|
+
});
|
|
465
|
+
}
|
|
426
466
|
throw error;
|
|
427
467
|
}
|
|
428
468
|
}
|
|
@@ -568,14 +608,27 @@ export const ConnectionHealthSnapshot = {
|
|
|
568
608
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
569
609
|
continue;
|
|
570
610
|
}
|
|
571
|
-
// Log structured error details and rethrow
|
|
572
|
-
|
|
573
|
-
operation
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
611
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
612
|
+
if (isConnectionError) {
|
|
613
|
+
logger.warn("Database upsert operation failed (transient after retries)", {
|
|
614
|
+
operation: 'upsertOneConnectionHealthSnapshot',
|
|
615
|
+
model: 'ConnectionHealthSnapshot',
|
|
616
|
+
error: String(error),
|
|
617
|
+
recordId: props.id,
|
|
618
|
+
isRetryable: true,
|
|
619
|
+
transient: true,
|
|
620
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
else {
|
|
624
|
+
logger.error("Database upsert operation failed", {
|
|
625
|
+
operation: 'upsertOneConnectionHealthSnapshot',
|
|
626
|
+
model: 'ConnectionHealthSnapshot',
|
|
627
|
+
error: String(error),
|
|
628
|
+
recordId: props.id,
|
|
629
|
+
isRetryable: false,
|
|
630
|
+
});
|
|
631
|
+
}
|
|
579
632
|
throw error;
|
|
580
633
|
}
|
|
581
634
|
}
|
|
@@ -714,13 +767,25 @@ export const ConnectionHealthSnapshot = {
|
|
|
714
767
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
715
768
|
continue;
|
|
716
769
|
}
|
|
717
|
-
// Log structured error details and rethrow
|
|
718
|
-
|
|
719
|
-
operation
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
770
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
771
|
+
if (isConnectionError) {
|
|
772
|
+
logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
773
|
+
operation: 'updateManyConnectionHealthSnapshot',
|
|
774
|
+
model: 'ConnectionHealthSnapshot',
|
|
775
|
+
error: String(error),
|
|
776
|
+
isRetryable: true,
|
|
777
|
+
transient: true,
|
|
778
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
else {
|
|
782
|
+
logger.error("Database updateMany operation failed", {
|
|
783
|
+
operation: 'updateManyConnectionHealthSnapshot',
|
|
784
|
+
model: 'ConnectionHealthSnapshot',
|
|
785
|
+
error: String(error),
|
|
786
|
+
isRetryable: false,
|
|
787
|
+
});
|
|
788
|
+
}
|
|
724
789
|
throw error;
|
|
725
790
|
}
|
|
726
791
|
}
|
|
@@ -842,14 +907,27 @@ export const ConnectionHealthSnapshot = {
|
|
|
842
907
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
843
908
|
continue;
|
|
844
909
|
}
|
|
845
|
-
// Log structured error details and rethrow
|
|
846
|
-
|
|
847
|
-
operation
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
910
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
911
|
+
if (isConnectionError) {
|
|
912
|
+
logger.warn("Database delete operation failed (transient after retries)", {
|
|
913
|
+
operation: 'deleteOneConnectionHealthSnapshot',
|
|
914
|
+
model: 'ConnectionHealthSnapshot',
|
|
915
|
+
error: String(error),
|
|
916
|
+
recordId: props.id,
|
|
917
|
+
isRetryable: true,
|
|
918
|
+
transient: true,
|
|
919
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
else {
|
|
923
|
+
logger.error("Database delete operation failed", {
|
|
924
|
+
operation: 'deleteOneConnectionHealthSnapshot',
|
|
925
|
+
model: 'ConnectionHealthSnapshot',
|
|
926
|
+
error: String(error),
|
|
927
|
+
recordId: props.id,
|
|
928
|
+
isRetryable: false,
|
|
929
|
+
});
|
|
930
|
+
}
|
|
853
931
|
throw error;
|
|
854
932
|
}
|
|
855
933
|
}
|
|
@@ -947,13 +1025,25 @@ export const ConnectionHealthSnapshot = {
|
|
|
947
1025
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
948
1026
|
continue;
|
|
949
1027
|
}
|
|
950
|
-
// Log structured error details and rethrow
|
|
951
|
-
|
|
952
|
-
operation
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1028
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1029
|
+
if (isConnectionError) {
|
|
1030
|
+
logger.warn("Database get operation failed (transient after retries)", {
|
|
1031
|
+
operation: 'getConnectionHealthSnapshot',
|
|
1032
|
+
model: 'ConnectionHealthSnapshot',
|
|
1033
|
+
error: String(error),
|
|
1034
|
+
isRetryable: true,
|
|
1035
|
+
transient: true,
|
|
1036
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
else {
|
|
1040
|
+
logger.error("Database get operation failed", {
|
|
1041
|
+
operation: 'getConnectionHealthSnapshot',
|
|
1042
|
+
model: 'ConnectionHealthSnapshot',
|
|
1043
|
+
error: String(error),
|
|
1044
|
+
isRetryable: false,
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
957
1047
|
throw error;
|
|
958
1048
|
}
|
|
959
1049
|
}
|
|
@@ -1039,13 +1129,25 @@ export const ConnectionHealthSnapshot = {
|
|
|
1039
1129
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1040
1130
|
continue;
|
|
1041
1131
|
}
|
|
1042
|
-
// Log structured error details and rethrow
|
|
1043
|
-
|
|
1044
|
-
operation
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1132
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1133
|
+
if (isConnectionError) {
|
|
1134
|
+
logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1135
|
+
operation: 'getAllConnectionHealthSnapshot',
|
|
1136
|
+
model: 'ConnectionHealthSnapshot',
|
|
1137
|
+
error: String(error),
|
|
1138
|
+
isRetryable: true,
|
|
1139
|
+
transient: true,
|
|
1140
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1141
|
+
});
|
|
1142
|
+
}
|
|
1143
|
+
else {
|
|
1144
|
+
logger.error("Database getAll operation failed", {
|
|
1145
|
+
operation: 'getAllConnectionHealthSnapshot',
|
|
1146
|
+
model: 'ConnectionHealthSnapshot',
|
|
1147
|
+
error: String(error),
|
|
1148
|
+
isRetryable: false,
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1049
1151
|
throw error;
|
|
1050
1152
|
}
|
|
1051
1153
|
}
|
|
@@ -1155,13 +1257,25 @@ export const ConnectionHealthSnapshot = {
|
|
|
1155
1257
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1156
1258
|
continue;
|
|
1157
1259
|
}
|
|
1158
|
-
// Log structured error details and rethrow
|
|
1159
|
-
|
|
1160
|
-
operation
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1260
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1261
|
+
if (isConnectionError) {
|
|
1262
|
+
logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1263
|
+
operation: 'findManyConnectionHealthSnapshot',
|
|
1264
|
+
model: 'ConnectionHealthSnapshot',
|
|
1265
|
+
error: String(error),
|
|
1266
|
+
isRetryable: true,
|
|
1267
|
+
transient: true,
|
|
1268
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1271
|
+
else {
|
|
1272
|
+
logger.error("Database findMany operation failed", {
|
|
1273
|
+
operation: 'findManyConnectionHealthSnapshot',
|
|
1274
|
+
model: 'ConnectionHealthSnapshot',
|
|
1275
|
+
error: String(error),
|
|
1276
|
+
isRetryable: false,
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1165
1279
|
throw error;
|
|
1166
1280
|
}
|
|
1167
1281
|
}
|
package/esm/Customer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Customer.d.ts","sourceRoot":"","sources":["../../src/Customer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAsMpG,eAAO,MAAM,QAAQ;IAEnB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,YAAY,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Customer.d.ts","sourceRoot":"","sources":["../../src/Customer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAsMpG,eAAO,MAAM,QAAQ;IAEnB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,YAAY,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC;IAilBlH;;;;;;;OAOG;sBACqB,YAAY,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;IAoJ1K;;;;;;OAMG;kBACiB,YAAY,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC;IA8vDhH;;;;;;OAMG;kBACiB,YAAY,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC;IAosEhH;;;;;;OAMG;sBACqB,YAAY,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IA4vDlI;;;;;;OAMG;kBACiB,YAAY,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC;IAqJhH;;;;;;;OAOG;eACc,YAAY,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAgI1J;;;;;OAKG;0BACyB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC;IA6GpG;;;;;;;OAOG;oBACmB,YAAY,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC;CAgJlK,CAAC"}
|