@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/esm/AuditLog.mjs
CHANGED
|
@@ -144,13 +144,28 @@ export const AuditLog = {
|
|
|
144
144
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
145
145
|
continue;
|
|
146
146
|
}
|
|
147
|
-
// Log structured error details and rethrow
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
147
|
+
// Log structured error details and rethrow.
|
|
148
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
149
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
150
|
+
// from true defects.
|
|
151
|
+
if (isConnectionError) {
|
|
152
|
+
logger.warn("Database create operation failed (transient after retries)", {
|
|
153
|
+
operation: 'createOneAuditLog',
|
|
154
|
+
model: 'AuditLog',
|
|
155
|
+
error: String(error),
|
|
156
|
+
isRetryable: true,
|
|
157
|
+
transient: true,
|
|
158
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
logger.error("Database create operation failed", {
|
|
163
|
+
operation: 'createOneAuditLog',
|
|
164
|
+
model: 'AuditLog',
|
|
165
|
+
error: String(error),
|
|
166
|
+
isRetryable: false,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
154
169
|
throw error;
|
|
155
170
|
}
|
|
156
171
|
}
|
|
@@ -276,13 +291,25 @@ export const AuditLog = {
|
|
|
276
291
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
277
292
|
continue;
|
|
278
293
|
}
|
|
279
|
-
// Log structured error details and rethrow
|
|
280
|
-
|
|
281
|
-
operation
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
294
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
295
|
+
if (isConnectionError) {
|
|
296
|
+
logger.warn("Database createMany operation failed (transient after retries)", {
|
|
297
|
+
operation: 'createManyAuditLog',
|
|
298
|
+
model: 'AuditLog',
|
|
299
|
+
error: String(error),
|
|
300
|
+
isRetryable: true,
|
|
301
|
+
transient: true,
|
|
302
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
logger.error("Database createMany operation failed", {
|
|
307
|
+
operation: 'createManyAuditLog',
|
|
308
|
+
model: 'AuditLog',
|
|
309
|
+
error: String(error),
|
|
310
|
+
isRetryable: false,
|
|
311
|
+
});
|
|
312
|
+
}
|
|
286
313
|
throw error;
|
|
287
314
|
}
|
|
288
315
|
}
|
|
@@ -429,14 +456,27 @@ export const AuditLog = {
|
|
|
429
456
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
430
457
|
continue;
|
|
431
458
|
}
|
|
432
|
-
// Log structured error details and rethrow
|
|
433
|
-
|
|
434
|
-
operation
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
459
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
460
|
+
if (isConnectionError) {
|
|
461
|
+
logger.warn("Database update operation failed (transient after retries)", {
|
|
462
|
+
operation: 'updateOneAuditLog',
|
|
463
|
+
model: 'AuditLog',
|
|
464
|
+
error: String(error),
|
|
465
|
+
recordId: props.id,
|
|
466
|
+
isRetryable: true,
|
|
467
|
+
transient: true,
|
|
468
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
logger.error("Database update operation failed", {
|
|
473
|
+
operation: 'updateOneAuditLog',
|
|
474
|
+
model: 'AuditLog',
|
|
475
|
+
error: String(error),
|
|
476
|
+
recordId: props.id,
|
|
477
|
+
isRetryable: false,
|
|
478
|
+
});
|
|
479
|
+
}
|
|
440
480
|
throw error;
|
|
441
481
|
}
|
|
442
482
|
}
|
|
@@ -594,14 +634,27 @@ export const AuditLog = {
|
|
|
594
634
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
595
635
|
continue;
|
|
596
636
|
}
|
|
597
|
-
// Log structured error details and rethrow
|
|
598
|
-
|
|
599
|
-
operation
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
637
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
638
|
+
if (isConnectionError) {
|
|
639
|
+
logger.warn("Database upsert operation failed (transient after retries)", {
|
|
640
|
+
operation: 'upsertOneAuditLog',
|
|
641
|
+
model: 'AuditLog',
|
|
642
|
+
error: String(error),
|
|
643
|
+
recordId: props.id,
|
|
644
|
+
isRetryable: true,
|
|
645
|
+
transient: true,
|
|
646
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
else {
|
|
650
|
+
logger.error("Database upsert operation failed", {
|
|
651
|
+
operation: 'upsertOneAuditLog',
|
|
652
|
+
model: 'AuditLog',
|
|
653
|
+
error: String(error),
|
|
654
|
+
recordId: props.id,
|
|
655
|
+
isRetryable: false,
|
|
656
|
+
});
|
|
657
|
+
}
|
|
605
658
|
throw error;
|
|
606
659
|
}
|
|
607
660
|
}
|
|
@@ -746,13 +799,25 @@ export const AuditLog = {
|
|
|
746
799
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
747
800
|
continue;
|
|
748
801
|
}
|
|
749
|
-
// Log structured error details and rethrow
|
|
750
|
-
|
|
751
|
-
operation
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
802
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
803
|
+
if (isConnectionError) {
|
|
804
|
+
logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
805
|
+
operation: 'updateManyAuditLog',
|
|
806
|
+
model: 'AuditLog',
|
|
807
|
+
error: String(error),
|
|
808
|
+
isRetryable: true,
|
|
809
|
+
transient: true,
|
|
810
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
else {
|
|
814
|
+
logger.error("Database updateMany operation failed", {
|
|
815
|
+
operation: 'updateManyAuditLog',
|
|
816
|
+
model: 'AuditLog',
|
|
817
|
+
error: String(error),
|
|
818
|
+
isRetryable: false,
|
|
819
|
+
});
|
|
820
|
+
}
|
|
756
821
|
throw error;
|
|
757
822
|
}
|
|
758
823
|
}
|
|
@@ -874,14 +939,27 @@ export const AuditLog = {
|
|
|
874
939
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
875
940
|
continue;
|
|
876
941
|
}
|
|
877
|
-
// Log structured error details and rethrow
|
|
878
|
-
|
|
879
|
-
operation
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
942
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
943
|
+
if (isConnectionError) {
|
|
944
|
+
logger.warn("Database delete operation failed (transient after retries)", {
|
|
945
|
+
operation: 'deleteOneAuditLog',
|
|
946
|
+
model: 'AuditLog',
|
|
947
|
+
error: String(error),
|
|
948
|
+
recordId: props.id,
|
|
949
|
+
isRetryable: true,
|
|
950
|
+
transient: true,
|
|
951
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
else {
|
|
955
|
+
logger.error("Database delete operation failed", {
|
|
956
|
+
operation: 'deleteOneAuditLog',
|
|
957
|
+
model: 'AuditLog',
|
|
958
|
+
error: String(error),
|
|
959
|
+
recordId: props.id,
|
|
960
|
+
isRetryable: false,
|
|
961
|
+
});
|
|
962
|
+
}
|
|
885
963
|
throw error;
|
|
886
964
|
}
|
|
887
965
|
}
|
|
@@ -979,13 +1057,25 @@ export const AuditLog = {
|
|
|
979
1057
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
980
1058
|
continue;
|
|
981
1059
|
}
|
|
982
|
-
// Log structured error details and rethrow
|
|
983
|
-
|
|
984
|
-
operation
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
1060
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1061
|
+
if (isConnectionError) {
|
|
1062
|
+
logger.warn("Database get operation failed (transient after retries)", {
|
|
1063
|
+
operation: 'getAuditLog',
|
|
1064
|
+
model: 'AuditLog',
|
|
1065
|
+
error: String(error),
|
|
1066
|
+
isRetryable: true,
|
|
1067
|
+
transient: true,
|
|
1068
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
1071
|
+
else {
|
|
1072
|
+
logger.error("Database get operation failed", {
|
|
1073
|
+
operation: 'getAuditLog',
|
|
1074
|
+
model: 'AuditLog',
|
|
1075
|
+
error: String(error),
|
|
1076
|
+
isRetryable: false,
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
989
1079
|
throw error;
|
|
990
1080
|
}
|
|
991
1081
|
}
|
|
@@ -1071,13 +1161,25 @@ export const AuditLog = {
|
|
|
1071
1161
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1072
1162
|
continue;
|
|
1073
1163
|
}
|
|
1074
|
-
// Log structured error details and rethrow
|
|
1075
|
-
|
|
1076
|
-
operation
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1164
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1165
|
+
if (isConnectionError) {
|
|
1166
|
+
logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1167
|
+
operation: 'getAllAuditLog',
|
|
1168
|
+
model: 'AuditLog',
|
|
1169
|
+
error: String(error),
|
|
1170
|
+
isRetryable: true,
|
|
1171
|
+
transient: true,
|
|
1172
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
else {
|
|
1176
|
+
logger.error("Database getAll operation failed", {
|
|
1177
|
+
operation: 'getAllAuditLog',
|
|
1178
|
+
model: 'AuditLog',
|
|
1179
|
+
error: String(error),
|
|
1180
|
+
isRetryable: false,
|
|
1181
|
+
});
|
|
1182
|
+
}
|
|
1081
1183
|
throw error;
|
|
1082
1184
|
}
|
|
1083
1185
|
}
|
|
@@ -1187,13 +1289,25 @@ export const AuditLog = {
|
|
|
1187
1289
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1188
1290
|
continue;
|
|
1189
1291
|
}
|
|
1190
|
-
// Log structured error details and rethrow
|
|
1191
|
-
|
|
1192
|
-
operation
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1292
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1293
|
+
if (isConnectionError) {
|
|
1294
|
+
logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1295
|
+
operation: 'findManyAuditLog',
|
|
1296
|
+
model: 'AuditLog',
|
|
1297
|
+
error: String(error),
|
|
1298
|
+
isRetryable: true,
|
|
1299
|
+
transient: true,
|
|
1300
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
1303
|
+
else {
|
|
1304
|
+
logger.error("Database findMany operation failed", {
|
|
1305
|
+
operation: 'findManyAuditLog',
|
|
1306
|
+
model: 'AuditLog',
|
|
1307
|
+
error: String(error),
|
|
1308
|
+
isRetryable: false,
|
|
1309
|
+
});
|
|
1310
|
+
}
|
|
1197
1311
|
throw error;
|
|
1198
1312
|
}
|
|
1199
1313
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authenticator.d.ts","sourceRoot":"","sources":["../../src/Authenticator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,IAAI,iB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