@adaptic/backend-legacy 0.0.960 → 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/esm/SystemAlert.mjs
CHANGED
|
@@ -168,13 +168,28 @@ export const SystemAlert = {
|
|
|
168
168
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
169
169
|
continue;
|
|
170
170
|
}
|
|
171
|
-
// Log structured error details and rethrow
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
171
|
+
// Log structured error details and rethrow.
|
|
172
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
173
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
174
|
+
// from true defects.
|
|
175
|
+
if (isConnectionError) {
|
|
176
|
+
logger.warn("Database create operation failed (transient after retries)", {
|
|
177
|
+
operation: 'createOneSystemAlert',
|
|
178
|
+
model: 'SystemAlert',
|
|
179
|
+
error: String(error),
|
|
180
|
+
isRetryable: true,
|
|
181
|
+
transient: true,
|
|
182
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
logger.error("Database create operation failed", {
|
|
187
|
+
operation: 'createOneSystemAlert',
|
|
188
|
+
model: 'SystemAlert',
|
|
189
|
+
error: String(error),
|
|
190
|
+
isRetryable: false,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
178
193
|
throw error;
|
|
179
194
|
}
|
|
180
195
|
}
|
|
@@ -311,13 +326,25 @@ export const SystemAlert = {
|
|
|
311
326
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
312
327
|
continue;
|
|
313
328
|
}
|
|
314
|
-
// Log structured error details and rethrow
|
|
315
|
-
|
|
316
|
-
operation
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
329
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
330
|
+
if (isConnectionError) {
|
|
331
|
+
logger.warn("Database createMany operation failed (transient after retries)", {
|
|
332
|
+
operation: 'createManySystemAlert',
|
|
333
|
+
model: 'SystemAlert',
|
|
334
|
+
error: String(error),
|
|
335
|
+
isRetryable: true,
|
|
336
|
+
transient: true,
|
|
337
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
logger.error("Database createMany operation failed", {
|
|
342
|
+
operation: 'createManySystemAlert',
|
|
343
|
+
model: 'SystemAlert',
|
|
344
|
+
error: String(error),
|
|
345
|
+
isRetryable: false,
|
|
346
|
+
});
|
|
347
|
+
}
|
|
321
348
|
throw error;
|
|
322
349
|
}
|
|
323
350
|
}
|
|
@@ -501,14 +528,27 @@ export const SystemAlert = {
|
|
|
501
528
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
502
529
|
continue;
|
|
503
530
|
}
|
|
504
|
-
// Log structured error details and rethrow
|
|
505
|
-
|
|
506
|
-
operation
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
531
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
532
|
+
if (isConnectionError) {
|
|
533
|
+
logger.warn("Database update operation failed (transient after retries)", {
|
|
534
|
+
operation: 'updateOneSystemAlert',
|
|
535
|
+
model: 'SystemAlert',
|
|
536
|
+
error: String(error),
|
|
537
|
+
recordId: props.id,
|
|
538
|
+
isRetryable: true,
|
|
539
|
+
transient: true,
|
|
540
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
else {
|
|
544
|
+
logger.error("Database update operation failed", {
|
|
545
|
+
operation: 'updateOneSystemAlert',
|
|
546
|
+
model: 'SystemAlert',
|
|
547
|
+
error: String(error),
|
|
548
|
+
recordId: props.id,
|
|
549
|
+
isRetryable: false,
|
|
550
|
+
});
|
|
551
|
+
}
|
|
512
552
|
throw error;
|
|
513
553
|
}
|
|
514
554
|
}
|
|
@@ -717,14 +757,27 @@ export const SystemAlert = {
|
|
|
717
757
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
718
758
|
continue;
|
|
719
759
|
}
|
|
720
|
-
// Log structured error details and rethrow
|
|
721
|
-
|
|
722
|
-
operation
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
760
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
761
|
+
if (isConnectionError) {
|
|
762
|
+
logger.warn("Database upsert operation failed (transient after retries)", {
|
|
763
|
+
operation: 'upsertOneSystemAlert',
|
|
764
|
+
model: 'SystemAlert',
|
|
765
|
+
error: String(error),
|
|
766
|
+
recordId: props.id,
|
|
767
|
+
isRetryable: true,
|
|
768
|
+
transient: true,
|
|
769
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
else {
|
|
773
|
+
logger.error("Database upsert operation failed", {
|
|
774
|
+
operation: 'upsertOneSystemAlert',
|
|
775
|
+
model: 'SystemAlert',
|
|
776
|
+
error: String(error),
|
|
777
|
+
recordId: props.id,
|
|
778
|
+
isRetryable: false,
|
|
779
|
+
});
|
|
780
|
+
}
|
|
728
781
|
throw error;
|
|
729
782
|
}
|
|
730
783
|
}
|
|
@@ -906,13 +959,25 @@ export const SystemAlert = {
|
|
|
906
959
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
907
960
|
continue;
|
|
908
961
|
}
|
|
909
|
-
// Log structured error details and rethrow
|
|
910
|
-
|
|
911
|
-
operation
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
962
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
963
|
+
if (isConnectionError) {
|
|
964
|
+
logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
965
|
+
operation: 'updateManySystemAlert',
|
|
966
|
+
model: 'SystemAlert',
|
|
967
|
+
error: String(error),
|
|
968
|
+
isRetryable: true,
|
|
969
|
+
transient: true,
|
|
970
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
else {
|
|
974
|
+
logger.error("Database updateMany operation failed", {
|
|
975
|
+
operation: 'updateManySystemAlert',
|
|
976
|
+
model: 'SystemAlert',
|
|
977
|
+
error: String(error),
|
|
978
|
+
isRetryable: false,
|
|
979
|
+
});
|
|
980
|
+
}
|
|
916
981
|
throw error;
|
|
917
982
|
}
|
|
918
983
|
}
|
|
@@ -1034,14 +1099,27 @@ export const SystemAlert = {
|
|
|
1034
1099
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1035
1100
|
continue;
|
|
1036
1101
|
}
|
|
1037
|
-
// Log structured error details and rethrow
|
|
1038
|
-
|
|
1039
|
-
operation
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1102
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1103
|
+
if (isConnectionError) {
|
|
1104
|
+
logger.warn("Database delete operation failed (transient after retries)", {
|
|
1105
|
+
operation: 'deleteOneSystemAlert',
|
|
1106
|
+
model: 'SystemAlert',
|
|
1107
|
+
error: String(error),
|
|
1108
|
+
recordId: props.id,
|
|
1109
|
+
isRetryable: true,
|
|
1110
|
+
transient: true,
|
|
1111
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
else {
|
|
1115
|
+
logger.error("Database delete operation failed", {
|
|
1116
|
+
operation: 'deleteOneSystemAlert',
|
|
1117
|
+
model: 'SystemAlert',
|
|
1118
|
+
error: String(error),
|
|
1119
|
+
recordId: props.id,
|
|
1120
|
+
isRetryable: false,
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1045
1123
|
throw error;
|
|
1046
1124
|
}
|
|
1047
1125
|
}
|
|
@@ -1148,13 +1226,25 @@ export const SystemAlert = {
|
|
|
1148
1226
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1149
1227
|
continue;
|
|
1150
1228
|
}
|
|
1151
|
-
// Log structured error details and rethrow
|
|
1152
|
-
|
|
1153
|
-
operation
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1229
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1230
|
+
if (isConnectionError) {
|
|
1231
|
+
logger.warn("Database get operation failed (transient after retries)", {
|
|
1232
|
+
operation: 'getSystemAlert',
|
|
1233
|
+
model: 'SystemAlert',
|
|
1234
|
+
error: String(error),
|
|
1235
|
+
isRetryable: true,
|
|
1236
|
+
transient: true,
|
|
1237
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1238
|
+
});
|
|
1239
|
+
}
|
|
1240
|
+
else {
|
|
1241
|
+
logger.error("Database get operation failed", {
|
|
1242
|
+
operation: 'getSystemAlert',
|
|
1243
|
+
model: 'SystemAlert',
|
|
1244
|
+
error: String(error),
|
|
1245
|
+
isRetryable: false,
|
|
1246
|
+
});
|
|
1247
|
+
}
|
|
1158
1248
|
throw error;
|
|
1159
1249
|
}
|
|
1160
1250
|
}
|
|
@@ -1240,13 +1330,25 @@ export const SystemAlert = {
|
|
|
1240
1330
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1241
1331
|
continue;
|
|
1242
1332
|
}
|
|
1243
|
-
// Log structured error details and rethrow
|
|
1244
|
-
|
|
1245
|
-
operation
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1333
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1334
|
+
if (isConnectionError) {
|
|
1335
|
+
logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1336
|
+
operation: 'getAllSystemAlert',
|
|
1337
|
+
model: 'SystemAlert',
|
|
1338
|
+
error: String(error),
|
|
1339
|
+
isRetryable: true,
|
|
1340
|
+
transient: true,
|
|
1341
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1342
|
+
});
|
|
1343
|
+
}
|
|
1344
|
+
else {
|
|
1345
|
+
logger.error("Database getAll operation failed", {
|
|
1346
|
+
operation: 'getAllSystemAlert',
|
|
1347
|
+
model: 'SystemAlert',
|
|
1348
|
+
error: String(error),
|
|
1349
|
+
isRetryable: false,
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1250
1352
|
throw error;
|
|
1251
1353
|
}
|
|
1252
1354
|
}
|
|
@@ -1365,13 +1467,25 @@ export const SystemAlert = {
|
|
|
1365
1467
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1366
1468
|
continue;
|
|
1367
1469
|
}
|
|
1368
|
-
// Log structured error details and rethrow
|
|
1369
|
-
|
|
1370
|
-
operation
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1470
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1471
|
+
if (isConnectionError) {
|
|
1472
|
+
logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1473
|
+
operation: 'findManySystemAlert',
|
|
1474
|
+
model: 'SystemAlert',
|
|
1475
|
+
error: String(error),
|
|
1476
|
+
isRetryable: true,
|
|
1477
|
+
transient: true,
|
|
1478
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
else {
|
|
1482
|
+
logger.error("Database findMany operation failed", {
|
|
1483
|
+
operation: 'findManySystemAlert',
|
|
1484
|
+
model: 'SystemAlert',
|
|
1485
|
+
error: String(error),
|
|
1486
|
+
isRetryable: false,
|
|
1487
|
+
});
|
|
1488
|
+
}
|
|
1375
1489
|
throw error;
|
|
1376
1490
|
}
|
|
1377
1491
|
}
|
package/esm/Trade.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trade.d.ts","sourceRoot":"","sources":["../../src/Trade.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AA2DpG,eAAO,MAAM,KAAK;IAEhB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Trade.d.ts","sourceRoot":"","sources":["../../src/Trade.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AA2DpG,eAAO,MAAM,KAAK;IAEhB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IA+M5G;;;;;;;OAOG;sBACqB,SAAS,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,YAAY;QAAE,cAAc,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAyKvK;;;;;;OAMG;kBACiB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IAoT1G;;;;;;OAMG;kBACiB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IAmX1G;;;;;;OAMG;sBACqB,SAAS,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAkT/H;;;;;;OAMG;kBACiB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IAqJ1G;;;;;;;OAOG;eACc,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;IA8HpJ;;;;;OAKG;0BACyB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC;IA6GjG;;;;;;;OAOG;oBACmB,SAAS,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC;CA0I5J,CAAC"}
|