@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/Action.cjs
CHANGED
|
@@ -202,13 +202,28 @@ exports.Action = {
|
|
|
202
202
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
203
203
|
continue;
|
|
204
204
|
}
|
|
205
|
-
// Log structured error details and rethrow
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
205
|
+
// Log structured error details and rethrow.
|
|
206
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
207
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
208
|
+
// from true defects.
|
|
209
|
+
if (isConnectionError) {
|
|
210
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
211
|
+
operation: 'createOneAction',
|
|
212
|
+
model: 'Action',
|
|
213
|
+
error: String(error),
|
|
214
|
+
isRetryable: true,
|
|
215
|
+
transient: true,
|
|
216
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
logger_1.logger.error("Database create operation failed", {
|
|
221
|
+
operation: 'createOneAction',
|
|
222
|
+
model: 'Action',
|
|
223
|
+
error: String(error),
|
|
224
|
+
isRetryable: false,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
212
227
|
throw error;
|
|
213
228
|
}
|
|
214
229
|
}
|
|
@@ -336,13 +351,25 @@ exports.Action = {
|
|
|
336
351
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
337
352
|
continue;
|
|
338
353
|
}
|
|
339
|
-
// Log structured error details and rethrow
|
|
340
|
-
|
|
341
|
-
operation
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
354
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
355
|
+
if (isConnectionError) {
|
|
356
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
357
|
+
operation: 'createManyAction',
|
|
358
|
+
model: 'Action',
|
|
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 createMany operation failed", {
|
|
367
|
+
operation: 'createManyAction',
|
|
368
|
+
model: 'Action',
|
|
369
|
+
error: String(error),
|
|
370
|
+
isRetryable: false,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
346
373
|
throw error;
|
|
347
374
|
}
|
|
348
375
|
}
|
|
@@ -645,14 +672,27 @@ exports.Action = {
|
|
|
645
672
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
646
673
|
continue;
|
|
647
674
|
}
|
|
648
|
-
// Log structured error details and rethrow
|
|
649
|
-
|
|
650
|
-
operation
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
675
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
676
|
+
if (isConnectionError) {
|
|
677
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
678
|
+
operation: 'updateOneAction',
|
|
679
|
+
model: 'Action',
|
|
680
|
+
error: String(error),
|
|
681
|
+
recordId: props.id,
|
|
682
|
+
isRetryable: true,
|
|
683
|
+
transient: true,
|
|
684
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
logger_1.logger.error("Database update operation failed", {
|
|
689
|
+
operation: 'updateOneAction',
|
|
690
|
+
model: 'Action',
|
|
691
|
+
error: String(error),
|
|
692
|
+
recordId: props.id,
|
|
693
|
+
isRetryable: false,
|
|
694
|
+
});
|
|
695
|
+
}
|
|
656
696
|
throw error;
|
|
657
697
|
}
|
|
658
698
|
}
|
|
@@ -1018,14 +1058,27 @@ exports.Action = {
|
|
|
1018
1058
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1019
1059
|
continue;
|
|
1020
1060
|
}
|
|
1021
|
-
// Log structured error details and rethrow
|
|
1022
|
-
|
|
1023
|
-
operation
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1061
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1062
|
+
if (isConnectionError) {
|
|
1063
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
1064
|
+
operation: 'upsertOneAction',
|
|
1065
|
+
model: 'Action',
|
|
1066
|
+
error: String(error),
|
|
1067
|
+
recordId: props.id,
|
|
1068
|
+
isRetryable: true,
|
|
1069
|
+
transient: true,
|
|
1070
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
else {
|
|
1074
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
1075
|
+
operation: 'upsertOneAction',
|
|
1076
|
+
model: 'Action',
|
|
1077
|
+
error: String(error),
|
|
1078
|
+
recordId: props.id,
|
|
1079
|
+
isRetryable: false,
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1029
1082
|
throw error;
|
|
1030
1083
|
}
|
|
1031
1084
|
}
|
|
@@ -1326,13 +1379,25 @@ exports.Action = {
|
|
|
1326
1379
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1327
1380
|
continue;
|
|
1328
1381
|
}
|
|
1329
|
-
// Log structured error details and rethrow
|
|
1330
|
-
|
|
1331
|
-
operation
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1382
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1383
|
+
if (isConnectionError) {
|
|
1384
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
1385
|
+
operation: 'updateManyAction',
|
|
1386
|
+
model: 'Action',
|
|
1387
|
+
error: String(error),
|
|
1388
|
+
isRetryable: true,
|
|
1389
|
+
transient: true,
|
|
1390
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1391
|
+
});
|
|
1392
|
+
}
|
|
1393
|
+
else {
|
|
1394
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
1395
|
+
operation: 'updateManyAction',
|
|
1396
|
+
model: 'Action',
|
|
1397
|
+
error: String(error),
|
|
1398
|
+
isRetryable: false,
|
|
1399
|
+
});
|
|
1400
|
+
}
|
|
1336
1401
|
throw error;
|
|
1337
1402
|
}
|
|
1338
1403
|
}
|
|
@@ -1455,14 +1520,27 @@ exports.Action = {
|
|
|
1455
1520
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1456
1521
|
continue;
|
|
1457
1522
|
}
|
|
1458
|
-
// Log structured error details and rethrow
|
|
1459
|
-
|
|
1460
|
-
operation
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1523
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1524
|
+
if (isConnectionError) {
|
|
1525
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
1526
|
+
operation: 'deleteOneAction',
|
|
1527
|
+
model: 'Action',
|
|
1528
|
+
error: String(error),
|
|
1529
|
+
recordId: props.id,
|
|
1530
|
+
isRetryable: true,
|
|
1531
|
+
transient: true,
|
|
1532
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
else {
|
|
1536
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
1537
|
+
operation: 'deleteOneAction',
|
|
1538
|
+
model: 'Action',
|
|
1539
|
+
error: String(error),
|
|
1540
|
+
recordId: props.id,
|
|
1541
|
+
isRetryable: false,
|
|
1542
|
+
});
|
|
1543
|
+
}
|
|
1466
1544
|
throw error;
|
|
1467
1545
|
}
|
|
1468
1546
|
}
|
|
@@ -1568,13 +1646,25 @@ exports.Action = {
|
|
|
1568
1646
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1569
1647
|
continue;
|
|
1570
1648
|
}
|
|
1571
|
-
// Log structured error details and rethrow
|
|
1572
|
-
|
|
1573
|
-
operation
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1649
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1650
|
+
if (isConnectionError) {
|
|
1651
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1652
|
+
operation: 'getAction',
|
|
1653
|
+
model: 'Action',
|
|
1654
|
+
error: String(error),
|
|
1655
|
+
isRetryable: true,
|
|
1656
|
+
transient: true,
|
|
1657
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1658
|
+
});
|
|
1659
|
+
}
|
|
1660
|
+
else {
|
|
1661
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1662
|
+
operation: 'getAction',
|
|
1663
|
+
model: 'Action',
|
|
1664
|
+
error: String(error),
|
|
1665
|
+
isRetryable: false,
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1578
1668
|
throw error;
|
|
1579
1669
|
}
|
|
1580
1670
|
}
|
|
@@ -1661,13 +1751,25 @@ exports.Action = {
|
|
|
1661
1751
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1662
1752
|
continue;
|
|
1663
1753
|
}
|
|
1664
|
-
// Log structured error details and rethrow
|
|
1665
|
-
|
|
1666
|
-
operation
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1754
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1755
|
+
if (isConnectionError) {
|
|
1756
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1757
|
+
operation: 'getAllAction',
|
|
1758
|
+
model: 'Action',
|
|
1759
|
+
error: String(error),
|
|
1760
|
+
isRetryable: true,
|
|
1761
|
+
transient: true,
|
|
1762
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1763
|
+
});
|
|
1764
|
+
}
|
|
1765
|
+
else {
|
|
1766
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1767
|
+
operation: 'getAllAction',
|
|
1768
|
+
model: 'Action',
|
|
1769
|
+
error: String(error),
|
|
1770
|
+
isRetryable: false,
|
|
1771
|
+
});
|
|
1772
|
+
}
|
|
1671
1773
|
throw error;
|
|
1672
1774
|
}
|
|
1673
1775
|
}
|
|
@@ -1784,13 +1886,25 @@ exports.Action = {
|
|
|
1784
1886
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1785
1887
|
continue;
|
|
1786
1888
|
}
|
|
1787
|
-
// Log structured error details and rethrow
|
|
1788
|
-
|
|
1789
|
-
operation
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1889
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1890
|
+
if (isConnectionError) {
|
|
1891
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1892
|
+
operation: 'findManyAction',
|
|
1893
|
+
model: 'Action',
|
|
1894
|
+
error: String(error),
|
|
1895
|
+
isRetryable: true,
|
|
1896
|
+
transient: true,
|
|
1897
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
else {
|
|
1901
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1902
|
+
operation: 'findManyAction',
|
|
1903
|
+
model: 'Action',
|
|
1904
|
+
error: String(error),
|
|
1905
|
+
isRetryable: false,
|
|
1906
|
+
});
|
|
1907
|
+
}
|
|
1794
1908
|
throw error;
|
|
1795
1909
|
}
|
|
1796
1910
|
}
|
package/Alert.cjs
CHANGED
|
@@ -605,13 +605,28 @@ exports.Alert = {
|
|
|
605
605
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
606
606
|
continue;
|
|
607
607
|
}
|
|
608
|
-
// Log structured error details and rethrow
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
608
|
+
// Log structured error details and rethrow.
|
|
609
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
610
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
611
|
+
// from true defects.
|
|
612
|
+
if (isConnectionError) {
|
|
613
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
614
|
+
operation: 'createOneAlert',
|
|
615
|
+
model: 'Alert',
|
|
616
|
+
error: String(error),
|
|
617
|
+
isRetryable: true,
|
|
618
|
+
transient: true,
|
|
619
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
else {
|
|
623
|
+
logger_1.logger.error("Database create operation failed", {
|
|
624
|
+
operation: 'createOneAlert',
|
|
625
|
+
model: 'Alert',
|
|
626
|
+
error: String(error),
|
|
627
|
+
isRetryable: false,
|
|
628
|
+
});
|
|
629
|
+
}
|
|
615
630
|
throw error;
|
|
616
631
|
}
|
|
617
632
|
}
|
|
@@ -742,13 +757,25 @@ exports.Alert = {
|
|
|
742
757
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
743
758
|
continue;
|
|
744
759
|
}
|
|
745
|
-
// Log structured error details and rethrow
|
|
746
|
-
|
|
747
|
-
operation
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
760
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
761
|
+
if (isConnectionError) {
|
|
762
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
763
|
+
operation: 'createManyAlert',
|
|
764
|
+
model: 'Alert',
|
|
765
|
+
error: String(error),
|
|
766
|
+
isRetryable: true,
|
|
767
|
+
transient: true,
|
|
768
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
773
|
+
operation: 'createManyAlert',
|
|
774
|
+
model: 'Alert',
|
|
775
|
+
error: String(error),
|
|
776
|
+
isRetryable: false,
|
|
777
|
+
});
|
|
778
|
+
}
|
|
752
779
|
throw error;
|
|
753
780
|
}
|
|
754
781
|
}
|
|
@@ -2641,14 +2668,27 @@ exports.Alert = {
|
|
|
2641
2668
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2642
2669
|
continue;
|
|
2643
2670
|
}
|
|
2644
|
-
// Log structured error details and rethrow
|
|
2645
|
-
|
|
2646
|
-
operation
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2671
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2672
|
+
if (isConnectionError) {
|
|
2673
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
2674
|
+
operation: 'updateOneAlert',
|
|
2675
|
+
model: 'Alert',
|
|
2676
|
+
error: String(error),
|
|
2677
|
+
recordId: props.id,
|
|
2678
|
+
isRetryable: true,
|
|
2679
|
+
transient: true,
|
|
2680
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2681
|
+
});
|
|
2682
|
+
}
|
|
2683
|
+
else {
|
|
2684
|
+
logger_1.logger.error("Database update operation failed", {
|
|
2685
|
+
operation: 'updateOneAlert',
|
|
2686
|
+
model: 'Alert',
|
|
2687
|
+
error: String(error),
|
|
2688
|
+
recordId: props.id,
|
|
2689
|
+
isRetryable: false,
|
|
2690
|
+
});
|
|
2691
|
+
}
|
|
2652
2692
|
throw error;
|
|
2653
2693
|
}
|
|
2654
2694
|
}
|
|
@@ -5008,14 +5048,27 @@ exports.Alert = {
|
|
|
5008
5048
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
5009
5049
|
continue;
|
|
5010
5050
|
}
|
|
5011
|
-
// Log structured error details and rethrow
|
|
5012
|
-
|
|
5013
|
-
operation
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5051
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
5052
|
+
if (isConnectionError) {
|
|
5053
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
5054
|
+
operation: 'upsertOneAlert',
|
|
5055
|
+
model: 'Alert',
|
|
5056
|
+
error: String(error),
|
|
5057
|
+
recordId: props.id,
|
|
5058
|
+
isRetryable: true,
|
|
5059
|
+
transient: true,
|
|
5060
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
5061
|
+
});
|
|
5062
|
+
}
|
|
5063
|
+
else {
|
|
5064
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
5065
|
+
operation: 'upsertOneAlert',
|
|
5066
|
+
model: 'Alert',
|
|
5067
|
+
error: String(error),
|
|
5068
|
+
recordId: props.id,
|
|
5069
|
+
isRetryable: false,
|
|
5070
|
+
});
|
|
5071
|
+
}
|
|
5019
5072
|
throw error;
|
|
5020
5073
|
}
|
|
5021
5074
|
}
|
|
@@ -6906,13 +6959,25 @@ exports.Alert = {
|
|
|
6906
6959
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6907
6960
|
continue;
|
|
6908
6961
|
}
|
|
6909
|
-
// Log structured error details and rethrow
|
|
6910
|
-
|
|
6911
|
-
operation
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6962
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6963
|
+
if (isConnectionError) {
|
|
6964
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
6965
|
+
operation: 'updateManyAlert',
|
|
6966
|
+
model: 'Alert',
|
|
6967
|
+
error: String(error),
|
|
6968
|
+
isRetryable: true,
|
|
6969
|
+
transient: true,
|
|
6970
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6971
|
+
});
|
|
6972
|
+
}
|
|
6973
|
+
else {
|
|
6974
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
6975
|
+
operation: 'updateManyAlert',
|
|
6976
|
+
model: 'Alert',
|
|
6977
|
+
error: String(error),
|
|
6978
|
+
isRetryable: false,
|
|
6979
|
+
});
|
|
6980
|
+
}
|
|
6916
6981
|
throw error;
|
|
6917
6982
|
}
|
|
6918
6983
|
}
|
|
@@ -7035,14 +7100,27 @@ exports.Alert = {
|
|
|
7035
7100
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7036
7101
|
continue;
|
|
7037
7102
|
}
|
|
7038
|
-
// Log structured error details and rethrow
|
|
7039
|
-
|
|
7040
|
-
operation
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7103
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7104
|
+
if (isConnectionError) {
|
|
7105
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
7106
|
+
operation: 'deleteOneAlert',
|
|
7107
|
+
model: 'Alert',
|
|
7108
|
+
error: String(error),
|
|
7109
|
+
recordId: props.id,
|
|
7110
|
+
isRetryable: true,
|
|
7111
|
+
transient: true,
|
|
7112
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7113
|
+
});
|
|
7114
|
+
}
|
|
7115
|
+
else {
|
|
7116
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
7117
|
+
operation: 'deleteOneAlert',
|
|
7118
|
+
model: 'Alert',
|
|
7119
|
+
error: String(error),
|
|
7120
|
+
recordId: props.id,
|
|
7121
|
+
isRetryable: false,
|
|
7122
|
+
});
|
|
7123
|
+
}
|
|
7046
7124
|
throw error;
|
|
7047
7125
|
}
|
|
7048
7126
|
}
|
|
@@ -7150,13 +7228,25 @@ exports.Alert = {
|
|
|
7150
7228
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7151
7229
|
continue;
|
|
7152
7230
|
}
|
|
7153
|
-
// Log structured error details and rethrow
|
|
7154
|
-
|
|
7155
|
-
operation
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7231
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7232
|
+
if (isConnectionError) {
|
|
7233
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
7234
|
+
operation: 'getAlert',
|
|
7235
|
+
model: 'Alert',
|
|
7236
|
+
error: String(error),
|
|
7237
|
+
isRetryable: true,
|
|
7238
|
+
transient: true,
|
|
7239
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7240
|
+
});
|
|
7241
|
+
}
|
|
7242
|
+
else {
|
|
7243
|
+
logger_1.logger.error("Database get operation failed", {
|
|
7244
|
+
operation: 'getAlert',
|
|
7245
|
+
model: 'Alert',
|
|
7246
|
+
error: String(error),
|
|
7247
|
+
isRetryable: false,
|
|
7248
|
+
});
|
|
7249
|
+
}
|
|
7160
7250
|
throw error;
|
|
7161
7251
|
}
|
|
7162
7252
|
}
|
|
@@ -7243,13 +7333,25 @@ exports.Alert = {
|
|
|
7243
7333
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7244
7334
|
continue;
|
|
7245
7335
|
}
|
|
7246
|
-
// Log structured error details and rethrow
|
|
7247
|
-
|
|
7248
|
-
operation
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7336
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7337
|
+
if (isConnectionError) {
|
|
7338
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
7339
|
+
operation: 'getAllAlert',
|
|
7340
|
+
model: 'Alert',
|
|
7341
|
+
error: String(error),
|
|
7342
|
+
isRetryable: true,
|
|
7343
|
+
transient: true,
|
|
7344
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7345
|
+
});
|
|
7346
|
+
}
|
|
7347
|
+
else {
|
|
7348
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
7349
|
+
operation: 'getAllAlert',
|
|
7350
|
+
model: 'Alert',
|
|
7351
|
+
error: String(error),
|
|
7352
|
+
isRetryable: false,
|
|
7353
|
+
});
|
|
7354
|
+
}
|
|
7253
7355
|
throw error;
|
|
7254
7356
|
}
|
|
7255
7357
|
}
|
|
@@ -7369,13 +7471,25 @@ exports.Alert = {
|
|
|
7369
7471
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7370
7472
|
continue;
|
|
7371
7473
|
}
|
|
7372
|
-
// Log structured error details and rethrow
|
|
7373
|
-
|
|
7374
|
-
operation
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7474
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7475
|
+
if (isConnectionError) {
|
|
7476
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
7477
|
+
operation: 'findManyAlert',
|
|
7478
|
+
model: 'Alert',
|
|
7479
|
+
error: String(error),
|
|
7480
|
+
isRetryable: true,
|
|
7481
|
+
transient: true,
|
|
7482
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7483
|
+
});
|
|
7484
|
+
}
|
|
7485
|
+
else {
|
|
7486
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
7487
|
+
operation: 'findManyAlert',
|
|
7488
|
+
model: 'Alert',
|
|
7489
|
+
error: String(error),
|
|
7490
|
+
isRetryable: false,
|
|
7491
|
+
});
|
|
7492
|
+
}
|
|
7379
7493
|
throw error;
|
|
7380
7494
|
}
|
|
7381
7495
|
}
|