@adaptic/backend-legacy 0.0.959 → 0.0.961
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ABTest.cjs +180 -66
- package/Account.cjs +180 -66
- package/AccountDecisionRecord.cjs +180 -66
- package/AccountLinkingRequest.cjs +180 -66
- package/Action.cjs +180 -66
- package/Alert.cjs +180 -66
- package/Allocation.cjs +180 -66
- package/AlpacaAccount.cjs +180 -66
- package/AnalyticsConfiguration.cjs +180 -66
- package/AnalyticsSnapshot.cjs +180 -66
- package/Asset.cjs +180 -66
- package/AuditLog.cjs +180 -66
- package/Authenticator.cjs +180 -66
- package/Configuration.cjs +180 -66
- package/ConflictEvent.cjs +180 -66
- package/ConnectionHealthSnapshot.cjs +180 -66
- package/Customer.cjs +180 -66
- package/DeadLetterMessage.cjs +180 -66
- package/DecisionMemorySummary.cjs +180 -66
- package/EconomicEvent.cjs +180 -66
- package/EquityBar.cjs +180 -66
- package/Event.cjs +180 -66
- package/EventSnapshot.cjs +180 -66
- package/FeatureImportanceAnalysis.cjs +180 -66
- package/InstitutionalFlowSignal.cjs +180 -66
- package/InstitutionalHolding.cjs +180 -66
- package/InstitutionalSentimentAlerts.cjs +180 -66
- package/InstitutionalSentimentErrors.cjs +180 -66
- package/InstitutionalSentimentHistory.cjs +180 -66
- package/InstitutionalSentimentMetrics.cjs +180 -66
- package/InviteToken.cjs +180 -66
- package/LinkedProvider.cjs +180 -66
- package/LlmConfiguration.cjs +180 -66
- package/MLModelVersion.cjs +180 -66
- package/MLTrainingData.cjs +180 -66
- package/MarketSentiment.cjs +180 -66
- package/ModelArtifact.cjs +180 -66
- package/ModelVersion.cjs +180 -66
- package/ModelVersionArtifact.cjs +180 -66
- package/NewsArticle.cjs +180 -66
- package/NewsArticleAssetSentiment.cjs +180 -66
- package/OptionsContract.cjs +180 -66
- package/OptionsGreeksHistory.cjs +180 -66
- package/OptionsPosition.cjs +180 -66
- package/OptionsPositionEvent.cjs +180 -66
- package/OptionsTradeExecution.cjs +180 -66
- package/PolicyOverlay.cjs +180 -66
- package/PortfolioGreeksHistory.cjs +180 -66
- package/ScheduledOptionOrder.cjs +180 -66
- package/Session.cjs +180 -66
- package/SignalGeneratorMetrics.cjs +180 -66
- package/SignalLineage.cjs +180 -66
- package/SignalOutcome.cjs +180 -66
- package/SignalPriorityQueue.cjs +180 -66
- package/SyncEvent.cjs +180 -66
- package/SystemAlert.cjs +180 -66
- package/Trade.cjs +180 -66
- package/TradeAuditEvent.cjs +180 -66
- package/TradeExecutionHistory.cjs +180 -66
- package/TradeOutcome.cjs +180 -66
- package/TradingPolicy.cjs +180 -66
- package/User.cjs +180 -66
- package/VerificationToken.cjs +180 -66
- package/WaitlistEntry.cjs +180 -66
- package/esm/ABTest.d.ts.map +1 -1
- package/esm/ABTest.js.map +1 -1
- package/esm/ABTest.mjs +180 -66
- package/esm/Account.d.ts.map +1 -1
- package/esm/Account.js.map +1 -1
- package/esm/Account.mjs +180 -66
- package/esm/AccountDecisionRecord.d.ts.map +1 -1
- package/esm/AccountDecisionRecord.js.map +1 -1
- package/esm/AccountDecisionRecord.mjs +180 -66
- package/esm/AccountLinkingRequest.d.ts.map +1 -1
- package/esm/AccountLinkingRequest.js.map +1 -1
- package/esm/AccountLinkingRequest.mjs +180 -66
- package/esm/Action.d.ts.map +1 -1
- package/esm/Action.js.map +1 -1
- package/esm/Action.mjs +180 -66
- package/esm/Alert.d.ts.map +1 -1
- package/esm/Alert.js.map +1 -1
- package/esm/Alert.mjs +180 -66
- package/esm/Allocation.d.ts.map +1 -1
- package/esm/Allocation.js.map +1 -1
- package/esm/Allocation.mjs +180 -66
- package/esm/AlpacaAccount.d.ts.map +1 -1
- package/esm/AlpacaAccount.js.map +1 -1
- package/esm/AlpacaAccount.mjs +180 -66
- package/esm/AnalyticsConfiguration.d.ts.map +1 -1
- package/esm/AnalyticsConfiguration.js.map +1 -1
- package/esm/AnalyticsConfiguration.mjs +180 -66
- package/esm/AnalyticsSnapshot.d.ts.map +1 -1
- package/esm/AnalyticsSnapshot.js.map +1 -1
- package/esm/AnalyticsSnapshot.mjs +180 -66
- package/esm/Asset.d.ts.map +1 -1
- package/esm/Asset.js.map +1 -1
- package/esm/Asset.mjs +180 -66
- package/esm/AuditLog.d.ts.map +1 -1
- package/esm/AuditLog.js.map +1 -1
- package/esm/AuditLog.mjs +180 -66
- package/esm/Authenticator.d.ts.map +1 -1
- package/esm/Authenticator.js.map +1 -1
- package/esm/Authenticator.mjs +180 -66
- package/esm/Configuration.d.ts.map +1 -1
- package/esm/Configuration.js.map +1 -1
- package/esm/Configuration.mjs +180 -66
- package/esm/ConflictEvent.d.ts.map +1 -1
- package/esm/ConflictEvent.js.map +1 -1
- package/esm/ConflictEvent.mjs +180 -66
- package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
- package/esm/ConnectionHealthSnapshot.js.map +1 -1
- package/esm/ConnectionHealthSnapshot.mjs +180 -66
- package/esm/Customer.d.ts.map +1 -1
- package/esm/Customer.js.map +1 -1
- package/esm/Customer.mjs +180 -66
- package/esm/DeadLetterMessage.d.ts.map +1 -1
- package/esm/DeadLetterMessage.js.map +1 -1
- package/esm/DeadLetterMessage.mjs +180 -66
- package/esm/DecisionMemorySummary.d.ts.map +1 -1
- package/esm/DecisionMemorySummary.js.map +1 -1
- package/esm/DecisionMemorySummary.mjs +180 -66
- package/esm/EconomicEvent.d.ts.map +1 -1
- package/esm/EconomicEvent.js.map +1 -1
- package/esm/EconomicEvent.mjs +180 -66
- package/esm/EquityBar.d.ts.map +1 -1
- package/esm/EquityBar.js.map +1 -1
- package/esm/EquityBar.mjs +180 -66
- package/esm/Event.d.ts.map +1 -1
- package/esm/Event.js.map +1 -1
- package/esm/Event.mjs +180 -66
- package/esm/EventSnapshot.d.ts.map +1 -1
- package/esm/EventSnapshot.js.map +1 -1
- package/esm/EventSnapshot.mjs +180 -66
- package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
- package/esm/FeatureImportanceAnalysis.js.map +1 -1
- package/esm/FeatureImportanceAnalysis.mjs +180 -66
- package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
- package/esm/InstitutionalFlowSignal.js.map +1 -1
- package/esm/InstitutionalFlowSignal.mjs +180 -66
- package/esm/InstitutionalHolding.d.ts.map +1 -1
- package/esm/InstitutionalHolding.js.map +1 -1
- package/esm/InstitutionalHolding.mjs +180 -66
- package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
- package/esm/InstitutionalSentimentAlerts.js.map +1 -1
- package/esm/InstitutionalSentimentAlerts.mjs +180 -66
- package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
- package/esm/InstitutionalSentimentErrors.js.map +1 -1
- package/esm/InstitutionalSentimentErrors.mjs +180 -66
- package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
- package/esm/InstitutionalSentimentHistory.js.map +1 -1
- package/esm/InstitutionalSentimentHistory.mjs +180 -66
- package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
- package/esm/InstitutionalSentimentMetrics.js.map +1 -1
- package/esm/InstitutionalSentimentMetrics.mjs +180 -66
- package/esm/InviteToken.d.ts.map +1 -1
- package/esm/InviteToken.js.map +1 -1
- package/esm/InviteToken.mjs +180 -66
- package/esm/LinkedProvider.d.ts.map +1 -1
- package/esm/LinkedProvider.js.map +1 -1
- package/esm/LinkedProvider.mjs +180 -66
- package/esm/LlmConfiguration.d.ts.map +1 -1
- package/esm/LlmConfiguration.js.map +1 -1
- package/esm/LlmConfiguration.mjs +180 -66
- package/esm/MLModelVersion.d.ts.map +1 -1
- package/esm/MLModelVersion.js.map +1 -1
- package/esm/MLModelVersion.mjs +180 -66
- package/esm/MLTrainingData.d.ts.map +1 -1
- package/esm/MLTrainingData.js.map +1 -1
- package/esm/MLTrainingData.mjs +180 -66
- package/esm/MarketSentiment.d.ts.map +1 -1
- package/esm/MarketSentiment.js.map +1 -1
- package/esm/MarketSentiment.mjs +180 -66
- package/esm/ModelArtifact.d.ts.map +1 -1
- package/esm/ModelArtifact.js.map +1 -1
- package/esm/ModelArtifact.mjs +180 -66
- package/esm/ModelVersion.d.ts.map +1 -1
- package/esm/ModelVersion.js.map +1 -1
- package/esm/ModelVersion.mjs +180 -66
- package/esm/ModelVersionArtifact.d.ts.map +1 -1
- package/esm/ModelVersionArtifact.js.map +1 -1
- package/esm/ModelVersionArtifact.mjs +180 -66
- package/esm/NewsArticle.d.ts.map +1 -1
- package/esm/NewsArticle.js.map +1 -1
- package/esm/NewsArticle.mjs +180 -66
- package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/esm/NewsArticleAssetSentiment.js.map +1 -1
- package/esm/NewsArticleAssetSentiment.mjs +180 -66
- package/esm/OptionsContract.d.ts.map +1 -1
- package/esm/OptionsContract.js.map +1 -1
- package/esm/OptionsContract.mjs +180 -66
- package/esm/OptionsGreeksHistory.d.ts.map +1 -1
- package/esm/OptionsGreeksHistory.js.map +1 -1
- package/esm/OptionsGreeksHistory.mjs +180 -66
- package/esm/OptionsPosition.d.ts.map +1 -1
- package/esm/OptionsPosition.js.map +1 -1
- package/esm/OptionsPosition.mjs +180 -66
- package/esm/OptionsPositionEvent.d.ts.map +1 -1
- package/esm/OptionsPositionEvent.js.map +1 -1
- package/esm/OptionsPositionEvent.mjs +180 -66
- package/esm/OptionsTradeExecution.d.ts.map +1 -1
- package/esm/OptionsTradeExecution.js.map +1 -1
- package/esm/OptionsTradeExecution.mjs +180 -66
- package/esm/PolicyOverlay.d.ts.map +1 -1
- package/esm/PolicyOverlay.js.map +1 -1
- package/esm/PolicyOverlay.mjs +180 -66
- package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
- package/esm/PortfolioGreeksHistory.js.map +1 -1
- package/esm/PortfolioGreeksHistory.mjs +180 -66
- package/esm/ScheduledOptionOrder.d.ts.map +1 -1
- package/esm/ScheduledOptionOrder.js.map +1 -1
- package/esm/ScheduledOptionOrder.mjs +180 -66
- package/esm/Session.d.ts.map +1 -1
- package/esm/Session.js.map +1 -1
- package/esm/Session.mjs +180 -66
- package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
- package/esm/SignalGeneratorMetrics.js.map +1 -1
- package/esm/SignalGeneratorMetrics.mjs +180 -66
- package/esm/SignalLineage.d.ts.map +1 -1
- package/esm/SignalLineage.js.map +1 -1
- package/esm/SignalLineage.mjs +180 -66
- package/esm/SignalOutcome.d.ts.map +1 -1
- package/esm/SignalOutcome.js.map +1 -1
- package/esm/SignalOutcome.mjs +180 -66
- package/esm/SignalPriorityQueue.d.ts.map +1 -1
- package/esm/SignalPriorityQueue.js.map +1 -1
- package/esm/SignalPriorityQueue.mjs +180 -66
- package/esm/SyncEvent.d.ts.map +1 -1
- package/esm/SyncEvent.js.map +1 -1
- package/esm/SyncEvent.mjs +180 -66
- package/esm/SystemAlert.d.ts.map +1 -1
- package/esm/SystemAlert.js.map +1 -1
- package/esm/SystemAlert.mjs +180 -66
- package/esm/Trade.d.ts.map +1 -1
- package/esm/Trade.js.map +1 -1
- package/esm/Trade.mjs +180 -66
- package/esm/TradeAuditEvent.d.ts.map +1 -1
- package/esm/TradeAuditEvent.js.map +1 -1
- package/esm/TradeAuditEvent.mjs +180 -66
- package/esm/TradeExecutionHistory.d.ts.map +1 -1
- package/esm/TradeExecutionHistory.js.map +1 -1
- package/esm/TradeExecutionHistory.mjs +180 -66
- package/esm/TradeOutcome.d.ts.map +1 -1
- package/esm/TradeOutcome.js.map +1 -1
- package/esm/TradeOutcome.mjs +180 -66
- package/esm/TradingPolicy.d.ts.map +1 -1
- package/esm/TradingPolicy.js.map +1 -1
- package/esm/TradingPolicy.mjs +180 -66
- package/esm/User.d.ts.map +1 -1
- package/esm/User.js.map +1 -1
- package/esm/User.mjs +180 -66
- package/esm/VerificationToken.d.ts.map +1 -1
- package/esm/VerificationToken.js.map +1 -1
- package/esm/VerificationToken.mjs +180 -66
- package/esm/WaitlistEntry.d.ts.map +1 -1
- package/esm/WaitlistEntry.js.map +1 -1
- package/esm/WaitlistEntry.mjs +180 -66
- package/esm/index.d.ts.map +1 -1
- package/package.json +1 -1
package/ScheduledOptionOrder.cjs
CHANGED
|
@@ -134,13 +134,28 @@ exports.ScheduledOptionOrder = {
|
|
|
134
134
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
135
135
|
continue;
|
|
136
136
|
}
|
|
137
|
-
// Log structured error details and rethrow
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
// Log structured error details and rethrow.
|
|
138
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
139
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
140
|
+
// from true defects.
|
|
141
|
+
if (isConnectionError) {
|
|
142
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
143
|
+
operation: 'createOneScheduledOptionOrder',
|
|
144
|
+
model: 'ScheduledOptionOrder',
|
|
145
|
+
error: String(error),
|
|
146
|
+
isRetryable: true,
|
|
147
|
+
transient: true,
|
|
148
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
logger_1.logger.error("Database create operation failed", {
|
|
153
|
+
operation: 'createOneScheduledOptionOrder',
|
|
154
|
+
model: 'ScheduledOptionOrder',
|
|
155
|
+
error: String(error),
|
|
156
|
+
isRetryable: false,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
144
159
|
throw error;
|
|
145
160
|
}
|
|
146
161
|
}
|
|
@@ -260,13 +275,25 @@ exports.ScheduledOptionOrder = {
|
|
|
260
275
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
261
276
|
continue;
|
|
262
277
|
}
|
|
263
|
-
// Log structured error details and rethrow
|
|
264
|
-
|
|
265
|
-
operation
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
278
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
279
|
+
if (isConnectionError) {
|
|
280
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
281
|
+
operation: 'createManyScheduledOptionOrder',
|
|
282
|
+
model: 'ScheduledOptionOrder',
|
|
283
|
+
error: String(error),
|
|
284
|
+
isRetryable: true,
|
|
285
|
+
transient: true,
|
|
286
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
291
|
+
operation: 'createManyScheduledOptionOrder',
|
|
292
|
+
model: 'ScheduledOptionOrder',
|
|
293
|
+
error: String(error),
|
|
294
|
+
isRetryable: false,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
270
297
|
throw error;
|
|
271
298
|
}
|
|
272
299
|
}
|
|
@@ -395,14 +422,27 @@ exports.ScheduledOptionOrder = {
|
|
|
395
422
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
396
423
|
continue;
|
|
397
424
|
}
|
|
398
|
-
// Log structured error details and rethrow
|
|
399
|
-
|
|
400
|
-
operation
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
425
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
426
|
+
if (isConnectionError) {
|
|
427
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
428
|
+
operation: 'updateOneScheduledOptionOrder',
|
|
429
|
+
model: 'ScheduledOptionOrder',
|
|
430
|
+
error: String(error),
|
|
431
|
+
recordId: props.id,
|
|
432
|
+
isRetryable: true,
|
|
433
|
+
transient: true,
|
|
434
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
logger_1.logger.error("Database update operation failed", {
|
|
439
|
+
operation: 'updateOneScheduledOptionOrder',
|
|
440
|
+
model: 'ScheduledOptionOrder',
|
|
441
|
+
error: String(error),
|
|
442
|
+
recordId: props.id,
|
|
443
|
+
isRetryable: false,
|
|
444
|
+
});
|
|
445
|
+
}
|
|
406
446
|
throw error;
|
|
407
447
|
}
|
|
408
448
|
}
|
|
@@ -535,14 +575,27 @@ exports.ScheduledOptionOrder = {
|
|
|
535
575
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
536
576
|
continue;
|
|
537
577
|
}
|
|
538
|
-
// Log structured error details and rethrow
|
|
539
|
-
|
|
540
|
-
operation
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
578
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
579
|
+
if (isConnectionError) {
|
|
580
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
581
|
+
operation: 'upsertOneScheduledOptionOrder',
|
|
582
|
+
model: 'ScheduledOptionOrder',
|
|
583
|
+
error: String(error),
|
|
584
|
+
recordId: props.id,
|
|
585
|
+
isRetryable: true,
|
|
586
|
+
transient: true,
|
|
587
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
592
|
+
operation: 'upsertOneScheduledOptionOrder',
|
|
593
|
+
model: 'ScheduledOptionOrder',
|
|
594
|
+
error: String(error),
|
|
595
|
+
recordId: props.id,
|
|
596
|
+
isRetryable: false,
|
|
597
|
+
});
|
|
598
|
+
}
|
|
546
599
|
throw error;
|
|
547
600
|
}
|
|
548
601
|
}
|
|
@@ -669,13 +722,25 @@ exports.ScheduledOptionOrder = {
|
|
|
669
722
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
670
723
|
continue;
|
|
671
724
|
}
|
|
672
|
-
// Log structured error details and rethrow
|
|
673
|
-
|
|
674
|
-
operation
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
725
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
726
|
+
if (isConnectionError) {
|
|
727
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
728
|
+
operation: 'updateManyScheduledOptionOrder',
|
|
729
|
+
model: 'ScheduledOptionOrder',
|
|
730
|
+
error: String(error),
|
|
731
|
+
isRetryable: true,
|
|
732
|
+
transient: true,
|
|
733
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
else {
|
|
737
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
738
|
+
operation: 'updateManyScheduledOptionOrder',
|
|
739
|
+
model: 'ScheduledOptionOrder',
|
|
740
|
+
error: String(error),
|
|
741
|
+
isRetryable: false,
|
|
742
|
+
});
|
|
743
|
+
}
|
|
679
744
|
throw error;
|
|
680
745
|
}
|
|
681
746
|
}
|
|
@@ -798,14 +863,27 @@ exports.ScheduledOptionOrder = {
|
|
|
798
863
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
799
864
|
continue;
|
|
800
865
|
}
|
|
801
|
-
// Log structured error details and rethrow
|
|
802
|
-
|
|
803
|
-
operation
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
866
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
867
|
+
if (isConnectionError) {
|
|
868
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
869
|
+
operation: 'deleteOneScheduledOptionOrder',
|
|
870
|
+
model: 'ScheduledOptionOrder',
|
|
871
|
+
error: String(error),
|
|
872
|
+
recordId: props.id,
|
|
873
|
+
isRetryable: true,
|
|
874
|
+
transient: true,
|
|
875
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
876
|
+
});
|
|
877
|
+
}
|
|
878
|
+
else {
|
|
879
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
880
|
+
operation: 'deleteOneScheduledOptionOrder',
|
|
881
|
+
model: 'ScheduledOptionOrder',
|
|
882
|
+
error: String(error),
|
|
883
|
+
recordId: props.id,
|
|
884
|
+
isRetryable: false,
|
|
885
|
+
});
|
|
886
|
+
}
|
|
809
887
|
throw error;
|
|
810
888
|
}
|
|
811
889
|
}
|
|
@@ -904,13 +982,25 @@ exports.ScheduledOptionOrder = {
|
|
|
904
982
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
905
983
|
continue;
|
|
906
984
|
}
|
|
907
|
-
// Log structured error details and rethrow
|
|
908
|
-
|
|
909
|
-
operation
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
985
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
986
|
+
if (isConnectionError) {
|
|
987
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
988
|
+
operation: 'getScheduledOptionOrder',
|
|
989
|
+
model: 'ScheduledOptionOrder',
|
|
990
|
+
error: String(error),
|
|
991
|
+
isRetryable: true,
|
|
992
|
+
transient: true,
|
|
993
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
else {
|
|
997
|
+
logger_1.logger.error("Database get operation failed", {
|
|
998
|
+
operation: 'getScheduledOptionOrder',
|
|
999
|
+
model: 'ScheduledOptionOrder',
|
|
1000
|
+
error: String(error),
|
|
1001
|
+
isRetryable: false,
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
914
1004
|
throw error;
|
|
915
1005
|
}
|
|
916
1006
|
}
|
|
@@ -997,13 +1087,25 @@ exports.ScheduledOptionOrder = {
|
|
|
997
1087
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
998
1088
|
continue;
|
|
999
1089
|
}
|
|
1000
|
-
// Log structured error details and rethrow
|
|
1001
|
-
|
|
1002
|
-
operation
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1090
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1091
|
+
if (isConnectionError) {
|
|
1092
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1093
|
+
operation: 'getAllScheduledOptionOrder',
|
|
1094
|
+
model: 'ScheduledOptionOrder',
|
|
1095
|
+
error: String(error),
|
|
1096
|
+
isRetryable: true,
|
|
1097
|
+
transient: true,
|
|
1098
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1101
|
+
else {
|
|
1102
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1103
|
+
operation: 'getAllScheduledOptionOrder',
|
|
1104
|
+
model: 'ScheduledOptionOrder',
|
|
1105
|
+
error: String(error),
|
|
1106
|
+
isRetryable: false,
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1007
1109
|
throw error;
|
|
1008
1110
|
}
|
|
1009
1111
|
}
|
|
@@ -1114,13 +1216,25 @@ exports.ScheduledOptionOrder = {
|
|
|
1114
1216
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1115
1217
|
continue;
|
|
1116
1218
|
}
|
|
1117
|
-
// Log structured error details and rethrow
|
|
1118
|
-
|
|
1119
|
-
operation
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1219
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1220
|
+
if (isConnectionError) {
|
|
1221
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1222
|
+
operation: 'findManyScheduledOptionOrder',
|
|
1223
|
+
model: 'ScheduledOptionOrder',
|
|
1224
|
+
error: String(error),
|
|
1225
|
+
isRetryable: true,
|
|
1226
|
+
transient: true,
|
|
1227
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
else {
|
|
1231
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1232
|
+
operation: 'findManyScheduledOptionOrder',
|
|
1233
|
+
model: 'ScheduledOptionOrder',
|
|
1234
|
+
error: String(error),
|
|
1235
|
+
isRetryable: false,
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1124
1238
|
throw error;
|
|
1125
1239
|
}
|
|
1126
1240
|
}
|
package/Session.cjs
CHANGED
|
@@ -590,13 +590,28 @@ exports.Session = {
|
|
|
590
590
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
591
591
|
continue;
|
|
592
592
|
}
|
|
593
|
-
// Log structured error details and rethrow
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
593
|
+
// Log structured error details and rethrow.
|
|
594
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
595
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
596
|
+
// from true defects.
|
|
597
|
+
if (isConnectionError) {
|
|
598
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
599
|
+
operation: 'createOneSession',
|
|
600
|
+
model: 'Session',
|
|
601
|
+
error: String(error),
|
|
602
|
+
isRetryable: true,
|
|
603
|
+
transient: true,
|
|
604
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
else {
|
|
608
|
+
logger_1.logger.error("Database create operation failed", {
|
|
609
|
+
operation: 'createOneSession',
|
|
610
|
+
model: 'Session',
|
|
611
|
+
error: String(error),
|
|
612
|
+
isRetryable: false,
|
|
613
|
+
});
|
|
614
|
+
}
|
|
600
615
|
throw error;
|
|
601
616
|
}
|
|
602
617
|
}
|
|
@@ -717,13 +732,25 @@ exports.Session = {
|
|
|
717
732
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
718
733
|
continue;
|
|
719
734
|
}
|
|
720
|
-
// Log structured error details and rethrow
|
|
721
|
-
|
|
722
|
-
operation
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
735
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
736
|
+
if (isConnectionError) {
|
|
737
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
738
|
+
operation: 'createManySession',
|
|
739
|
+
model: 'Session',
|
|
740
|
+
error: String(error),
|
|
741
|
+
isRetryable: true,
|
|
742
|
+
transient: true,
|
|
743
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
else {
|
|
747
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
748
|
+
operation: 'createManySession',
|
|
749
|
+
model: 'Session',
|
|
750
|
+
error: String(error),
|
|
751
|
+
isRetryable: false,
|
|
752
|
+
});
|
|
753
|
+
}
|
|
727
754
|
throw error;
|
|
728
755
|
}
|
|
729
756
|
}
|
|
@@ -2525,14 +2552,27 @@ exports.Session = {
|
|
|
2525
2552
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2526
2553
|
continue;
|
|
2527
2554
|
}
|
|
2528
|
-
// Log structured error details and rethrow
|
|
2529
|
-
|
|
2530
|
-
operation
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2555
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
2556
|
+
if (isConnectionError) {
|
|
2557
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
2558
|
+
operation: 'updateOneSession',
|
|
2559
|
+
model: 'Session',
|
|
2560
|
+
error: String(error),
|
|
2561
|
+
recordId: props.id,
|
|
2562
|
+
isRetryable: true,
|
|
2563
|
+
transient: true,
|
|
2564
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
2565
|
+
});
|
|
2566
|
+
}
|
|
2567
|
+
else {
|
|
2568
|
+
logger_1.logger.error("Database update operation failed", {
|
|
2569
|
+
operation: 'updateOneSession',
|
|
2570
|
+
model: 'Session',
|
|
2571
|
+
error: String(error),
|
|
2572
|
+
recordId: props.id,
|
|
2573
|
+
isRetryable: false,
|
|
2574
|
+
});
|
|
2575
|
+
}
|
|
2536
2576
|
throw error;
|
|
2537
2577
|
}
|
|
2538
2578
|
}
|
|
@@ -4785,14 +4825,27 @@ exports.Session = {
|
|
|
4785
4825
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4786
4826
|
continue;
|
|
4787
4827
|
}
|
|
4788
|
-
// Log structured error details and rethrow
|
|
4789
|
-
|
|
4790
|
-
operation
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4828
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
4829
|
+
if (isConnectionError) {
|
|
4830
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
4831
|
+
operation: 'upsertOneSession',
|
|
4832
|
+
model: 'Session',
|
|
4833
|
+
error: String(error),
|
|
4834
|
+
recordId: props.id,
|
|
4835
|
+
isRetryable: true,
|
|
4836
|
+
transient: true,
|
|
4837
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
4838
|
+
});
|
|
4839
|
+
}
|
|
4840
|
+
else {
|
|
4841
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
4842
|
+
operation: 'upsertOneSession',
|
|
4843
|
+
model: 'Session',
|
|
4844
|
+
error: String(error),
|
|
4845
|
+
recordId: props.id,
|
|
4846
|
+
isRetryable: false,
|
|
4847
|
+
});
|
|
4848
|
+
}
|
|
4796
4849
|
throw error;
|
|
4797
4850
|
}
|
|
4798
4851
|
}
|
|
@@ -6592,13 +6645,25 @@ exports.Session = {
|
|
|
6592
6645
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6593
6646
|
continue;
|
|
6594
6647
|
}
|
|
6595
|
-
// Log structured error details and rethrow
|
|
6596
|
-
|
|
6597
|
-
operation
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6648
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6649
|
+
if (isConnectionError) {
|
|
6650
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
6651
|
+
operation: 'updateManySession',
|
|
6652
|
+
model: 'Session',
|
|
6653
|
+
error: String(error),
|
|
6654
|
+
isRetryable: true,
|
|
6655
|
+
transient: true,
|
|
6656
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6657
|
+
});
|
|
6658
|
+
}
|
|
6659
|
+
else {
|
|
6660
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
6661
|
+
operation: 'updateManySession',
|
|
6662
|
+
model: 'Session',
|
|
6663
|
+
error: String(error),
|
|
6664
|
+
isRetryable: false,
|
|
6665
|
+
});
|
|
6666
|
+
}
|
|
6602
6667
|
throw error;
|
|
6603
6668
|
}
|
|
6604
6669
|
}
|
|
@@ -6721,14 +6786,27 @@ exports.Session = {
|
|
|
6721
6786
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6722
6787
|
continue;
|
|
6723
6788
|
}
|
|
6724
|
-
// Log structured error details and rethrow
|
|
6725
|
-
|
|
6726
|
-
operation
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6789
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6790
|
+
if (isConnectionError) {
|
|
6791
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
6792
|
+
operation: 'deleteOneSession',
|
|
6793
|
+
model: 'Session',
|
|
6794
|
+
error: String(error),
|
|
6795
|
+
recordId: props.id,
|
|
6796
|
+
isRetryable: true,
|
|
6797
|
+
transient: true,
|
|
6798
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6799
|
+
});
|
|
6800
|
+
}
|
|
6801
|
+
else {
|
|
6802
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
6803
|
+
operation: 'deleteOneSession',
|
|
6804
|
+
model: 'Session',
|
|
6805
|
+
error: String(error),
|
|
6806
|
+
recordId: props.id,
|
|
6807
|
+
isRetryable: false,
|
|
6808
|
+
});
|
|
6809
|
+
}
|
|
6732
6810
|
throw error;
|
|
6733
6811
|
}
|
|
6734
6812
|
}
|
|
@@ -6827,13 +6905,25 @@ exports.Session = {
|
|
|
6827
6905
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6828
6906
|
continue;
|
|
6829
6907
|
}
|
|
6830
|
-
// Log structured error details and rethrow
|
|
6831
|
-
|
|
6832
|
-
operation
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6908
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
6909
|
+
if (isConnectionError) {
|
|
6910
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
6911
|
+
operation: 'getSession',
|
|
6912
|
+
model: 'Session',
|
|
6913
|
+
error: String(error),
|
|
6914
|
+
isRetryable: true,
|
|
6915
|
+
transient: true,
|
|
6916
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
6917
|
+
});
|
|
6918
|
+
}
|
|
6919
|
+
else {
|
|
6920
|
+
logger_1.logger.error("Database get operation failed", {
|
|
6921
|
+
operation: 'getSession',
|
|
6922
|
+
model: 'Session',
|
|
6923
|
+
error: String(error),
|
|
6924
|
+
isRetryable: false,
|
|
6925
|
+
});
|
|
6926
|
+
}
|
|
6837
6927
|
throw error;
|
|
6838
6928
|
}
|
|
6839
6929
|
}
|
|
@@ -6920,13 +7010,25 @@ exports.Session = {
|
|
|
6920
7010
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
6921
7011
|
continue;
|
|
6922
7012
|
}
|
|
6923
|
-
// Log structured error details and rethrow
|
|
6924
|
-
|
|
6925
|
-
operation
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
7013
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7014
|
+
if (isConnectionError) {
|
|
7015
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
7016
|
+
operation: 'getAllSession',
|
|
7017
|
+
model: 'Session',
|
|
7018
|
+
error: String(error),
|
|
7019
|
+
isRetryable: true,
|
|
7020
|
+
transient: true,
|
|
7021
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7022
|
+
});
|
|
7023
|
+
}
|
|
7024
|
+
else {
|
|
7025
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
7026
|
+
operation: 'getAllSession',
|
|
7027
|
+
model: 'Session',
|
|
7028
|
+
error: String(error),
|
|
7029
|
+
isRetryable: false,
|
|
7030
|
+
});
|
|
7031
|
+
}
|
|
6930
7032
|
throw error;
|
|
6931
7033
|
}
|
|
6932
7034
|
}
|
|
@@ -7037,13 +7139,25 @@ exports.Session = {
|
|
|
7037
7139
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
7038
7140
|
continue;
|
|
7039
7141
|
}
|
|
7040
|
-
// Log structured error details and rethrow
|
|
7041
|
-
|
|
7042
|
-
operation
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7142
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
7143
|
+
if (isConnectionError) {
|
|
7144
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
7145
|
+
operation: 'findManySession',
|
|
7146
|
+
model: 'Session',
|
|
7147
|
+
error: String(error),
|
|
7148
|
+
isRetryable: true,
|
|
7149
|
+
transient: true,
|
|
7150
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
7151
|
+
});
|
|
7152
|
+
}
|
|
7153
|
+
else {
|
|
7154
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
7155
|
+
operation: 'findManySession',
|
|
7156
|
+
model: 'Session',
|
|
7157
|
+
error: String(error),
|
|
7158
|
+
isRetryable: false,
|
|
7159
|
+
});
|
|
7160
|
+
}
|
|
7047
7161
|
throw error;
|
|
7048
7162
|
}
|
|
7049
7163
|
}
|