@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/Asset.cjs
CHANGED
|
@@ -348,13 +348,28 @@ exports.Asset = {
|
|
|
348
348
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
349
349
|
continue;
|
|
350
350
|
}
|
|
351
|
-
// Log structured error details and rethrow
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
351
|
+
// Log structured error details and rethrow.
|
|
352
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
353
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
354
|
+
// from true defects.
|
|
355
|
+
if (isConnectionError) {
|
|
356
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
357
|
+
operation: 'createOneAsset',
|
|
358
|
+
model: 'Asset',
|
|
359
|
+
error: String(error),
|
|
360
|
+
isRetryable: true,
|
|
361
|
+
transient: true,
|
|
362
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
logger_1.logger.error("Database create operation failed", {
|
|
367
|
+
operation: 'createOneAsset',
|
|
368
|
+
model: 'Asset',
|
|
369
|
+
error: String(error),
|
|
370
|
+
isRetryable: false,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
358
373
|
throw error;
|
|
359
374
|
}
|
|
360
375
|
}
|
|
@@ -527,13 +542,25 @@ exports.Asset = {
|
|
|
527
542
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
528
543
|
continue;
|
|
529
544
|
}
|
|
530
|
-
// Log structured error details and rethrow
|
|
531
|
-
|
|
532
|
-
operation
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
545
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
546
|
+
if (isConnectionError) {
|
|
547
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
548
|
+
operation: 'createManyAsset',
|
|
549
|
+
model: 'Asset',
|
|
550
|
+
error: String(error),
|
|
551
|
+
isRetryable: true,
|
|
552
|
+
transient: true,
|
|
553
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
else {
|
|
557
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
558
|
+
operation: 'createManyAsset',
|
|
559
|
+
model: 'Asset',
|
|
560
|
+
error: String(error),
|
|
561
|
+
isRetryable: false,
|
|
562
|
+
});
|
|
563
|
+
}
|
|
537
564
|
throw error;
|
|
538
565
|
}
|
|
539
566
|
}
|
|
@@ -1086,14 +1113,27 @@ exports.Asset = {
|
|
|
1086
1113
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1087
1114
|
continue;
|
|
1088
1115
|
}
|
|
1089
|
-
// Log structured error details and rethrow
|
|
1090
|
-
|
|
1091
|
-
operation
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1116
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1117
|
+
if (isConnectionError) {
|
|
1118
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
1119
|
+
operation: 'updateOneAsset',
|
|
1120
|
+
model: 'Asset',
|
|
1121
|
+
error: String(error),
|
|
1122
|
+
recordId: props.id,
|
|
1123
|
+
isRetryable: true,
|
|
1124
|
+
transient: true,
|
|
1125
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1128
|
+
else {
|
|
1129
|
+
logger_1.logger.error("Database update operation failed", {
|
|
1130
|
+
operation: 'updateOneAsset',
|
|
1131
|
+
model: 'Asset',
|
|
1132
|
+
error: String(error),
|
|
1133
|
+
recordId: props.id,
|
|
1134
|
+
isRetryable: false,
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
1097
1137
|
throw error;
|
|
1098
1138
|
}
|
|
1099
1139
|
}
|
|
@@ -1805,14 +1845,27 @@ exports.Asset = {
|
|
|
1805
1845
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1806
1846
|
continue;
|
|
1807
1847
|
}
|
|
1808
|
-
// Log structured error details and rethrow
|
|
1809
|
-
|
|
1810
|
-
operation
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1848
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1849
|
+
if (isConnectionError) {
|
|
1850
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
1851
|
+
operation: 'upsertOneAsset',
|
|
1852
|
+
model: 'Asset',
|
|
1853
|
+
error: String(error),
|
|
1854
|
+
recordId: props.id,
|
|
1855
|
+
isRetryable: true,
|
|
1856
|
+
transient: true,
|
|
1857
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
else {
|
|
1861
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
1862
|
+
operation: 'upsertOneAsset',
|
|
1863
|
+
model: 'Asset',
|
|
1864
|
+
error: String(error),
|
|
1865
|
+
recordId: props.id,
|
|
1866
|
+
isRetryable: false,
|
|
1867
|
+
});
|
|
1868
|
+
}
|
|
1816
1869
|
throw error;
|
|
1817
1870
|
}
|
|
1818
1871
|
}
|
|
@@ -2363,13 +2416,25 @@ exports.Asset = {
|
|
|
2363
2416
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2364
2417
|
continue;
|
|
2365
2418
|
}
|
|
2366
|
-
// Log structured error details and rethrow
|
|
2367
|
-
|
|
2368
|
-
operation
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2419
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2420
|
+
if (isConnectionError) {
|
|
2421
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
2422
|
+
operation: 'updateManyAsset',
|
|
2423
|
+
model: 'Asset',
|
|
2424
|
+
error: String(error),
|
|
2425
|
+
isRetryable: true,
|
|
2426
|
+
transient: true,
|
|
2427
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2428
|
+
});
|
|
2429
|
+
}
|
|
2430
|
+
else {
|
|
2431
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
2432
|
+
operation: 'updateManyAsset',
|
|
2433
|
+
model: 'Asset',
|
|
2434
|
+
error: String(error),
|
|
2435
|
+
isRetryable: false,
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2373
2438
|
throw error;
|
|
2374
2439
|
}
|
|
2375
2440
|
}
|
|
@@ -2492,14 +2557,27 @@ exports.Asset = {
|
|
|
2492
2557
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2493
2558
|
continue;
|
|
2494
2559
|
}
|
|
2495
|
-
// Log structured error details and rethrow
|
|
2496
|
-
|
|
2497
|
-
operation
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2560
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2561
|
+
if (isConnectionError) {
|
|
2562
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
2563
|
+
operation: 'deleteOneAsset',
|
|
2564
|
+
model: 'Asset',
|
|
2565
|
+
error: String(error),
|
|
2566
|
+
recordId: props.id,
|
|
2567
|
+
isRetryable: true,
|
|
2568
|
+
transient: true,
|
|
2569
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2570
|
+
});
|
|
2571
|
+
}
|
|
2572
|
+
else {
|
|
2573
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
2574
|
+
operation: 'deleteOneAsset',
|
|
2575
|
+
model: 'Asset',
|
|
2576
|
+
error: String(error),
|
|
2577
|
+
recordId: props.id,
|
|
2578
|
+
isRetryable: false,
|
|
2579
|
+
});
|
|
2580
|
+
}
|
|
2503
2581
|
throw error;
|
|
2504
2582
|
}
|
|
2505
2583
|
}
|
|
@@ -2600,13 +2678,25 @@ exports.Asset = {
|
|
|
2600
2678
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2601
2679
|
continue;
|
|
2602
2680
|
}
|
|
2603
|
-
// Log structured error details and rethrow
|
|
2604
|
-
|
|
2605
|
-
operation
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2681
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2682
|
+
if (isConnectionError) {
|
|
2683
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
2684
|
+
operation: 'getAsset',
|
|
2685
|
+
model: 'Asset',
|
|
2686
|
+
error: String(error),
|
|
2687
|
+
isRetryable: true,
|
|
2688
|
+
transient: true,
|
|
2689
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2690
|
+
});
|
|
2691
|
+
}
|
|
2692
|
+
else {
|
|
2693
|
+
logger_1.logger.error("Database get operation failed", {
|
|
2694
|
+
operation: 'getAsset',
|
|
2695
|
+
model: 'Asset',
|
|
2696
|
+
error: String(error),
|
|
2697
|
+
isRetryable: false,
|
|
2698
|
+
});
|
|
2699
|
+
}
|
|
2610
2700
|
throw error;
|
|
2611
2701
|
}
|
|
2612
2702
|
}
|
|
@@ -2693,13 +2783,25 @@ exports.Asset = {
|
|
|
2693
2783
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2694
2784
|
continue;
|
|
2695
2785
|
}
|
|
2696
|
-
// Log structured error details and rethrow
|
|
2697
|
-
|
|
2698
|
-
operation
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2786
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2787
|
+
if (isConnectionError) {
|
|
2788
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
2789
|
+
operation: 'getAllAsset',
|
|
2790
|
+
model: 'Asset',
|
|
2791
|
+
error: String(error),
|
|
2792
|
+
isRetryable: true,
|
|
2793
|
+
transient: true,
|
|
2794
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2795
|
+
});
|
|
2796
|
+
}
|
|
2797
|
+
else {
|
|
2798
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
2799
|
+
operation: 'getAllAsset',
|
|
2800
|
+
model: 'Asset',
|
|
2801
|
+
error: String(error),
|
|
2802
|
+
isRetryable: false,
|
|
2803
|
+
});
|
|
2804
|
+
}
|
|
2703
2805
|
throw error;
|
|
2704
2806
|
}
|
|
2705
2807
|
}
|
|
@@ -2816,13 +2918,25 @@ exports.Asset = {
|
|
|
2816
2918
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2817
2919
|
continue;
|
|
2818
2920
|
}
|
|
2819
|
-
// Log structured error details and rethrow
|
|
2820
|
-
|
|
2821
|
-
operation
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2921
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2922
|
+
if (isConnectionError) {
|
|
2923
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
2924
|
+
operation: 'findManyAsset',
|
|
2925
|
+
model: 'Asset',
|
|
2926
|
+
error: String(error),
|
|
2927
|
+
isRetryable: true,
|
|
2928
|
+
transient: true,
|
|
2929
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2930
|
+
});
|
|
2931
|
+
}
|
|
2932
|
+
else {
|
|
2933
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
2934
|
+
operation: 'findManyAsset',
|
|
2935
|
+
model: 'Asset',
|
|
2936
|
+
error: String(error),
|
|
2937
|
+
isRetryable: false,
|
|
2938
|
+
});
|
|
2939
|
+
}
|
|
2826
2940
|
throw error;
|
|
2827
2941
|
}
|
|
2828
2942
|
}
|
package/AuditLog.cjs
CHANGED
|
@@ -148,13 +148,28 @@ exports.AuditLog = {
|
|
|
148
148
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
149
149
|
continue;
|
|
150
150
|
}
|
|
151
|
-
// Log structured error details and rethrow
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
151
|
+
// Log structured error details and rethrow.
|
|
152
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
153
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
154
|
+
// from true defects.
|
|
155
|
+
if (isConnectionError) {
|
|
156
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
157
|
+
operation: 'createOneAuditLog',
|
|
158
|
+
model: 'AuditLog',
|
|
159
|
+
error: String(error),
|
|
160
|
+
isRetryable: true,
|
|
161
|
+
transient: true,
|
|
162
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
logger_1.logger.error("Database create operation failed", {
|
|
167
|
+
operation: 'createOneAuditLog',
|
|
168
|
+
model: 'AuditLog',
|
|
169
|
+
error: String(error),
|
|
170
|
+
isRetryable: false,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
158
173
|
throw error;
|
|
159
174
|
}
|
|
160
175
|
}
|
|
@@ -281,13 +296,25 @@ exports.AuditLog = {
|
|
|
281
296
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
282
297
|
continue;
|
|
283
298
|
}
|
|
284
|
-
// Log structured error details and rethrow
|
|
285
|
-
|
|
286
|
-
operation
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
299
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
300
|
+
if (isConnectionError) {
|
|
301
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
302
|
+
operation: 'createManyAuditLog',
|
|
303
|
+
model: 'AuditLog',
|
|
304
|
+
error: String(error),
|
|
305
|
+
isRetryable: true,
|
|
306
|
+
transient: true,
|
|
307
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
312
|
+
operation: 'createManyAuditLog',
|
|
313
|
+
model: 'AuditLog',
|
|
314
|
+
error: String(error),
|
|
315
|
+
isRetryable: false,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
291
318
|
throw error;
|
|
292
319
|
}
|
|
293
320
|
}
|
|
@@ -435,14 +462,27 @@ exports.AuditLog = {
|
|
|
435
462
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
436
463
|
continue;
|
|
437
464
|
}
|
|
438
|
-
// Log structured error details and rethrow
|
|
439
|
-
|
|
440
|
-
operation
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
465
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
466
|
+
if (isConnectionError) {
|
|
467
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
468
|
+
operation: 'updateOneAuditLog',
|
|
469
|
+
model: 'AuditLog',
|
|
470
|
+
error: String(error),
|
|
471
|
+
recordId: props.id,
|
|
472
|
+
isRetryable: true,
|
|
473
|
+
transient: true,
|
|
474
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
else {
|
|
478
|
+
logger_1.logger.error("Database update operation failed", {
|
|
479
|
+
operation: 'updateOneAuditLog',
|
|
480
|
+
model: 'AuditLog',
|
|
481
|
+
error: String(error),
|
|
482
|
+
recordId: props.id,
|
|
483
|
+
isRetryable: false,
|
|
484
|
+
});
|
|
485
|
+
}
|
|
446
486
|
throw error;
|
|
447
487
|
}
|
|
448
488
|
}
|
|
@@ -601,14 +641,27 @@ exports.AuditLog = {
|
|
|
601
641
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
602
642
|
continue;
|
|
603
643
|
}
|
|
604
|
-
// Log structured error details and rethrow
|
|
605
|
-
|
|
606
|
-
operation
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
644
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
645
|
+
if (isConnectionError) {
|
|
646
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
647
|
+
operation: 'upsertOneAuditLog',
|
|
648
|
+
model: 'AuditLog',
|
|
649
|
+
error: String(error),
|
|
650
|
+
recordId: props.id,
|
|
651
|
+
isRetryable: true,
|
|
652
|
+
transient: true,
|
|
653
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
else {
|
|
657
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
658
|
+
operation: 'upsertOneAuditLog',
|
|
659
|
+
model: 'AuditLog',
|
|
660
|
+
error: String(error),
|
|
661
|
+
recordId: props.id,
|
|
662
|
+
isRetryable: false,
|
|
663
|
+
});
|
|
664
|
+
}
|
|
612
665
|
throw error;
|
|
613
666
|
}
|
|
614
667
|
}
|
|
@@ -754,13 +807,25 @@ exports.AuditLog = {
|
|
|
754
807
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
755
808
|
continue;
|
|
756
809
|
}
|
|
757
|
-
// Log structured error details and rethrow
|
|
758
|
-
|
|
759
|
-
operation
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
810
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
811
|
+
if (isConnectionError) {
|
|
812
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
813
|
+
operation: 'updateManyAuditLog',
|
|
814
|
+
model: 'AuditLog',
|
|
815
|
+
error: String(error),
|
|
816
|
+
isRetryable: true,
|
|
817
|
+
transient: true,
|
|
818
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
else {
|
|
822
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
823
|
+
operation: 'updateManyAuditLog',
|
|
824
|
+
model: 'AuditLog',
|
|
825
|
+
error: String(error),
|
|
826
|
+
isRetryable: false,
|
|
827
|
+
});
|
|
828
|
+
}
|
|
764
829
|
throw error;
|
|
765
830
|
}
|
|
766
831
|
}
|
|
@@ -883,14 +948,27 @@ exports.AuditLog = {
|
|
|
883
948
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
884
949
|
continue;
|
|
885
950
|
}
|
|
886
|
-
// Log structured error details and rethrow
|
|
887
|
-
|
|
888
|
-
operation
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
951
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
952
|
+
if (isConnectionError) {
|
|
953
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
954
|
+
operation: 'deleteOneAuditLog',
|
|
955
|
+
model: 'AuditLog',
|
|
956
|
+
error: String(error),
|
|
957
|
+
recordId: props.id,
|
|
958
|
+
isRetryable: true,
|
|
959
|
+
transient: true,
|
|
960
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
else {
|
|
964
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
965
|
+
operation: 'deleteOneAuditLog',
|
|
966
|
+
model: 'AuditLog',
|
|
967
|
+
error: String(error),
|
|
968
|
+
recordId: props.id,
|
|
969
|
+
isRetryable: false,
|
|
970
|
+
});
|
|
971
|
+
}
|
|
894
972
|
throw error;
|
|
895
973
|
}
|
|
896
974
|
}
|
|
@@ -989,13 +1067,25 @@ exports.AuditLog = {
|
|
|
989
1067
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
990
1068
|
continue;
|
|
991
1069
|
}
|
|
992
|
-
// Log structured error details and rethrow
|
|
993
|
-
|
|
994
|
-
operation
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1070
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1071
|
+
if (isConnectionError) {
|
|
1072
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1073
|
+
operation: 'getAuditLog',
|
|
1074
|
+
model: 'AuditLog',
|
|
1075
|
+
error: String(error),
|
|
1076
|
+
isRetryable: true,
|
|
1077
|
+
transient: true,
|
|
1078
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1079
|
+
});
|
|
1080
|
+
}
|
|
1081
|
+
else {
|
|
1082
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1083
|
+
operation: 'getAuditLog',
|
|
1084
|
+
model: 'AuditLog',
|
|
1085
|
+
error: String(error),
|
|
1086
|
+
isRetryable: false,
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
999
1089
|
throw error;
|
|
1000
1090
|
}
|
|
1001
1091
|
}
|
|
@@ -1082,13 +1172,25 @@ exports.AuditLog = {
|
|
|
1082
1172
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1083
1173
|
continue;
|
|
1084
1174
|
}
|
|
1085
|
-
// Log structured error details and rethrow
|
|
1086
|
-
|
|
1087
|
-
operation
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1175
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1176
|
+
if (isConnectionError) {
|
|
1177
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1178
|
+
operation: 'getAllAuditLog',
|
|
1179
|
+
model: 'AuditLog',
|
|
1180
|
+
error: String(error),
|
|
1181
|
+
isRetryable: true,
|
|
1182
|
+
transient: true,
|
|
1183
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
else {
|
|
1187
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1188
|
+
operation: 'getAllAuditLog',
|
|
1189
|
+
model: 'AuditLog',
|
|
1190
|
+
error: String(error),
|
|
1191
|
+
isRetryable: false,
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1092
1194
|
throw error;
|
|
1093
1195
|
}
|
|
1094
1196
|
}
|
|
@@ -1199,13 +1301,25 @@ exports.AuditLog = {
|
|
|
1199
1301
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1200
1302
|
continue;
|
|
1201
1303
|
}
|
|
1202
|
-
// Log structured error details and rethrow
|
|
1203
|
-
|
|
1204
|
-
operation
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1304
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1305
|
+
if (isConnectionError) {
|
|
1306
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1307
|
+
operation: 'findManyAuditLog',
|
|
1308
|
+
model: 'AuditLog',
|
|
1309
|
+
error: String(error),
|
|
1310
|
+
isRetryable: true,
|
|
1311
|
+
transient: true,
|
|
1312
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1313
|
+
});
|
|
1314
|
+
}
|
|
1315
|
+
else {
|
|
1316
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1317
|
+
operation: 'findManyAuditLog',
|
|
1318
|
+
model: 'AuditLog',
|
|
1319
|
+
error: String(error),
|
|
1320
|
+
isRetryable: false,
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1209
1323
|
throw error;
|
|
1210
1324
|
}
|
|
1211
1325
|
}
|