@adaptic/backend-legacy 0.0.953 → 0.0.954
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 +207 -36
- package/Account.cjs +207 -36
- package/AccountDecisionRecord.cjs +207 -36
- package/AccountLinkingRequest.cjs +207 -36
- package/Action.cjs +207 -36
- package/Alert.cjs +207 -36
- package/Allocation.cjs +207 -36
- package/AlpacaAccount.cjs +207 -36
- package/AnalyticsConfiguration.cjs +207 -36
- package/AnalyticsSnapshot.cjs +207 -36
- package/Asset.cjs +207 -36
- package/AuditLog.cjs +207 -36
- package/Authenticator.cjs +207 -36
- package/Configuration.cjs +207 -36
- package/ConflictEvent.cjs +207 -36
- package/ConnectionHealthSnapshot.cjs +207 -36
- package/Customer.cjs +207 -36
- package/DeadLetterMessage.cjs +207 -36
- package/DecisionMemorySummary.cjs +207 -36
- package/EconomicEvent.cjs +207 -36
- package/EquityBar.cjs +207 -36
- package/Event.cjs +207 -36
- package/EventSnapshot.cjs +207 -36
- package/FeatureImportanceAnalysis.cjs +207 -36
- package/InstitutionalFlowSignal.cjs +207 -36
- package/InstitutionalHolding.cjs +207 -36
- package/InstitutionalSentimentAlerts.cjs +207 -36
- package/InstitutionalSentimentErrors.cjs +207 -36
- package/InstitutionalSentimentHistory.cjs +207 -36
- package/InstitutionalSentimentMetrics.cjs +207 -36
- package/InviteToken.cjs +207 -36
- package/LinkedProvider.cjs +207 -36
- package/LlmConfiguration.cjs +207 -36
- package/MLModelVersion.cjs +207 -36
- package/MLTrainingData.cjs +207 -36
- package/MarketSentiment.cjs +207 -36
- package/ModelArtifact.cjs +207 -36
- package/ModelVersion.cjs +207 -36
- package/ModelVersionArtifact.cjs +207 -36
- package/NewsArticle.cjs +207 -36
- package/NewsArticleAssetSentiment.cjs +207 -36
- package/OptionsContract.cjs +207 -36
- package/OptionsGreeksHistory.cjs +207 -36
- package/OptionsPosition.cjs +207 -36
- package/OptionsPositionEvent.cjs +207 -36
- package/OptionsTradeExecution.cjs +207 -36
- package/PolicyOverlay.cjs +207 -36
- package/PortfolioGreeksHistory.cjs +207 -36
- package/ScheduledOptionOrder.cjs +207 -36
- package/Session.cjs +207 -36
- package/SignalGeneratorMetrics.cjs +207 -36
- package/SignalLineage.cjs +207 -36
- package/SignalOutcome.cjs +207 -36
- package/SignalPriorityQueue.cjs +207 -36
- package/SyncEvent.cjs +207 -36
- package/SystemAlert.cjs +207 -36
- package/Trade.cjs +207 -36
- package/TradeAuditEvent.cjs +207 -36
- package/TradeExecutionHistory.cjs +207 -36
- package/TradeOutcome.cjs +207 -36
- package/TradingPolicy.cjs +207 -36
- package/User.cjs +207 -36
- package/VerificationToken.cjs +207 -36
- package/WaitlistEntry.cjs +207 -36
- package/client.cjs +2 -0
- package/esm/ABTest.d.ts.map +1 -1
- package/esm/ABTest.js.map +1 -1
- package/esm/ABTest.mjs +189 -18
- package/esm/Account.d.ts.map +1 -1
- package/esm/Account.js.map +1 -1
- package/esm/Account.mjs +189 -18
- package/esm/AccountDecisionRecord.d.ts.map +1 -1
- package/esm/AccountDecisionRecord.js.map +1 -1
- package/esm/AccountDecisionRecord.mjs +189 -18
- package/esm/AccountLinkingRequest.d.ts.map +1 -1
- package/esm/AccountLinkingRequest.js.map +1 -1
- package/esm/AccountLinkingRequest.mjs +189 -18
- package/esm/Action.d.ts.map +1 -1
- package/esm/Action.js.map +1 -1
- package/esm/Action.mjs +189 -18
- package/esm/Alert.d.ts.map +1 -1
- package/esm/Alert.js.map +1 -1
- package/esm/Alert.mjs +189 -18
- package/esm/Allocation.d.ts.map +1 -1
- package/esm/Allocation.js.map +1 -1
- package/esm/Allocation.mjs +189 -18
- package/esm/AlpacaAccount.d.ts.map +1 -1
- package/esm/AlpacaAccount.js.map +1 -1
- package/esm/AlpacaAccount.mjs +189 -18
- package/esm/AnalyticsConfiguration.d.ts.map +1 -1
- package/esm/AnalyticsConfiguration.js.map +1 -1
- package/esm/AnalyticsConfiguration.mjs +189 -18
- package/esm/AnalyticsSnapshot.d.ts.map +1 -1
- package/esm/AnalyticsSnapshot.js.map +1 -1
- package/esm/AnalyticsSnapshot.mjs +189 -18
- package/esm/Asset.d.ts.map +1 -1
- package/esm/Asset.js.map +1 -1
- package/esm/Asset.mjs +189 -18
- package/esm/AuditLog.d.ts.map +1 -1
- package/esm/AuditLog.js.map +1 -1
- package/esm/AuditLog.mjs +189 -18
- package/esm/Authenticator.d.ts.map +1 -1
- package/esm/Authenticator.js.map +1 -1
- package/esm/Authenticator.mjs +189 -18
- package/esm/Configuration.d.ts.map +1 -1
- package/esm/Configuration.js.map +1 -1
- package/esm/Configuration.mjs +189 -18
- package/esm/ConflictEvent.d.ts.map +1 -1
- package/esm/ConflictEvent.js.map +1 -1
- package/esm/ConflictEvent.mjs +189 -18
- package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
- package/esm/ConnectionHealthSnapshot.js.map +1 -1
- package/esm/ConnectionHealthSnapshot.mjs +189 -18
- package/esm/Customer.d.ts.map +1 -1
- package/esm/Customer.js.map +1 -1
- package/esm/Customer.mjs +189 -18
- package/esm/DeadLetterMessage.d.ts.map +1 -1
- package/esm/DeadLetterMessage.js.map +1 -1
- package/esm/DeadLetterMessage.mjs +189 -18
- package/esm/DecisionMemorySummary.d.ts.map +1 -1
- package/esm/DecisionMemorySummary.js.map +1 -1
- package/esm/DecisionMemorySummary.mjs +189 -18
- package/esm/EconomicEvent.d.ts.map +1 -1
- package/esm/EconomicEvent.js.map +1 -1
- package/esm/EconomicEvent.mjs +189 -18
- package/esm/EquityBar.d.ts.map +1 -1
- package/esm/EquityBar.js.map +1 -1
- package/esm/EquityBar.mjs +189 -18
- package/esm/Event.d.ts.map +1 -1
- package/esm/Event.js.map +1 -1
- package/esm/Event.mjs +189 -18
- package/esm/EventSnapshot.d.ts.map +1 -1
- package/esm/EventSnapshot.js.map +1 -1
- package/esm/EventSnapshot.mjs +189 -18
- package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
- package/esm/FeatureImportanceAnalysis.js.map +1 -1
- package/esm/FeatureImportanceAnalysis.mjs +189 -18
- package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
- package/esm/InstitutionalFlowSignal.js.map +1 -1
- package/esm/InstitutionalFlowSignal.mjs +189 -18
- package/esm/InstitutionalHolding.d.ts.map +1 -1
- package/esm/InstitutionalHolding.js.map +1 -1
- package/esm/InstitutionalHolding.mjs +189 -18
- package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
- package/esm/InstitutionalSentimentAlerts.js.map +1 -1
- package/esm/InstitutionalSentimentAlerts.mjs +189 -18
- package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
- package/esm/InstitutionalSentimentErrors.js.map +1 -1
- package/esm/InstitutionalSentimentErrors.mjs +189 -18
- package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
- package/esm/InstitutionalSentimentHistory.js.map +1 -1
- package/esm/InstitutionalSentimentHistory.mjs +189 -18
- package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
- package/esm/InstitutionalSentimentMetrics.js.map +1 -1
- package/esm/InstitutionalSentimentMetrics.mjs +189 -18
- package/esm/InviteToken.d.ts.map +1 -1
- package/esm/InviteToken.js.map +1 -1
- package/esm/InviteToken.mjs +189 -18
- package/esm/LinkedProvider.d.ts.map +1 -1
- package/esm/LinkedProvider.js.map +1 -1
- package/esm/LinkedProvider.mjs +189 -18
- package/esm/LlmConfiguration.d.ts.map +1 -1
- package/esm/LlmConfiguration.js.map +1 -1
- package/esm/LlmConfiguration.mjs +189 -18
- package/esm/MLModelVersion.d.ts.map +1 -1
- package/esm/MLModelVersion.js.map +1 -1
- package/esm/MLModelVersion.mjs +189 -18
- package/esm/MLTrainingData.d.ts.map +1 -1
- package/esm/MLTrainingData.js.map +1 -1
- package/esm/MLTrainingData.mjs +189 -18
- package/esm/MarketSentiment.d.ts.map +1 -1
- package/esm/MarketSentiment.js.map +1 -1
- package/esm/MarketSentiment.mjs +189 -18
- package/esm/ModelArtifact.d.ts.map +1 -1
- package/esm/ModelArtifact.js.map +1 -1
- package/esm/ModelArtifact.mjs +189 -18
- package/esm/ModelVersion.d.ts.map +1 -1
- package/esm/ModelVersion.js.map +1 -1
- package/esm/ModelVersion.mjs +189 -18
- package/esm/ModelVersionArtifact.d.ts.map +1 -1
- package/esm/ModelVersionArtifact.js.map +1 -1
- package/esm/ModelVersionArtifact.mjs +189 -18
- package/esm/NewsArticle.d.ts.map +1 -1
- package/esm/NewsArticle.js.map +1 -1
- package/esm/NewsArticle.mjs +189 -18
- package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/esm/NewsArticleAssetSentiment.js.map +1 -1
- package/esm/NewsArticleAssetSentiment.mjs +189 -18
- package/esm/OptionsContract.d.ts.map +1 -1
- package/esm/OptionsContract.js.map +1 -1
- package/esm/OptionsContract.mjs +189 -18
- package/esm/OptionsGreeksHistory.d.ts.map +1 -1
- package/esm/OptionsGreeksHistory.js.map +1 -1
- package/esm/OptionsGreeksHistory.mjs +189 -18
- package/esm/OptionsPosition.d.ts.map +1 -1
- package/esm/OptionsPosition.js.map +1 -1
- package/esm/OptionsPosition.mjs +189 -18
- package/esm/OptionsPositionEvent.d.ts.map +1 -1
- package/esm/OptionsPositionEvent.js.map +1 -1
- package/esm/OptionsPositionEvent.mjs +189 -18
- package/esm/OptionsTradeExecution.d.ts.map +1 -1
- package/esm/OptionsTradeExecution.js.map +1 -1
- package/esm/OptionsTradeExecution.mjs +189 -18
- package/esm/PolicyOverlay.d.ts.map +1 -1
- package/esm/PolicyOverlay.js.map +1 -1
- package/esm/PolicyOverlay.mjs +189 -18
- package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
- package/esm/PortfolioGreeksHistory.js.map +1 -1
- package/esm/PortfolioGreeksHistory.mjs +189 -18
- package/esm/ScheduledOptionOrder.d.ts.map +1 -1
- package/esm/ScheduledOptionOrder.js.map +1 -1
- package/esm/ScheduledOptionOrder.mjs +189 -18
- package/esm/Session.d.ts.map +1 -1
- package/esm/Session.js.map +1 -1
- package/esm/Session.mjs +189 -18
- package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
- package/esm/SignalGeneratorMetrics.js.map +1 -1
- package/esm/SignalGeneratorMetrics.mjs +189 -18
- package/esm/SignalLineage.d.ts.map +1 -1
- package/esm/SignalLineage.js.map +1 -1
- package/esm/SignalLineage.mjs +189 -18
- package/esm/SignalOutcome.d.ts.map +1 -1
- package/esm/SignalOutcome.js.map +1 -1
- package/esm/SignalOutcome.mjs +189 -18
- package/esm/SignalPriorityQueue.d.ts.map +1 -1
- package/esm/SignalPriorityQueue.js.map +1 -1
- package/esm/SignalPriorityQueue.mjs +189 -18
- package/esm/SyncEvent.d.ts.map +1 -1
- package/esm/SyncEvent.js.map +1 -1
- package/esm/SyncEvent.mjs +189 -18
- package/esm/SystemAlert.d.ts.map +1 -1
- package/esm/SystemAlert.js.map +1 -1
- package/esm/SystemAlert.mjs +189 -18
- package/esm/Trade.d.ts.map +1 -1
- package/esm/Trade.js.map +1 -1
- package/esm/Trade.mjs +189 -18
- package/esm/TradeAuditEvent.d.ts.map +1 -1
- package/esm/TradeAuditEvent.js.map +1 -1
- package/esm/TradeAuditEvent.mjs +189 -18
- package/esm/TradeExecutionHistory.d.ts.map +1 -1
- package/esm/TradeExecutionHistory.js.map +1 -1
- package/esm/TradeExecutionHistory.mjs +189 -18
- package/esm/TradeOutcome.d.ts.map +1 -1
- package/esm/TradeOutcome.js.map +1 -1
- package/esm/TradeOutcome.mjs +189 -18
- package/esm/TradingPolicy.d.ts.map +1 -1
- package/esm/TradingPolicy.js.map +1 -1
- package/esm/TradingPolicy.mjs +189 -18
- package/esm/User.d.ts.map +1 -1
- package/esm/User.js.map +1 -1
- package/esm/User.mjs +189 -18
- package/esm/VerificationToken.d.ts.map +1 -1
- package/esm/VerificationToken.js.map +1 -1
- package/esm/VerificationToken.mjs +189 -18
- package/esm/WaitlistEntry.d.ts.map +1 -1
- package/esm/WaitlistEntry.js.map +1 -1
- package/esm/WaitlistEntry.mjs +189 -18
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js.map +1 -1
- package/esm/client.mjs +2 -0
- package/esm/index.d.ts.map +1 -1
- package/package.json +1 -1
package/esm/Allocation.mjs
CHANGED
|
@@ -572,12 +572,31 @@ export const Allocation = {
|
|
|
572
572
|
});
|
|
573
573
|
throw error;
|
|
574
574
|
}
|
|
575
|
-
// Check if this is a database connection error that we should retry
|
|
575
|
+
// Check if this is a database connection error that we should retry.
|
|
576
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
577
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
578
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
576
579
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
577
580
|
error.message?.includes('Cannot reach database server') ||
|
|
578
581
|
error.message?.includes('Connection timed out') ||
|
|
582
|
+
error.message?.includes('aborted due to timeout') ||
|
|
583
|
+
error.message?.includes('TimeoutError') ||
|
|
584
|
+
error.message?.includes('fetch failed') ||
|
|
585
|
+
error.message?.includes('socket hang up') ||
|
|
586
|
+
error.message?.includes('ECONNRESET') ||
|
|
587
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
588
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
589
|
+
error.message?.includes('Connection pool timeout') ||
|
|
590
|
+
error.message?.includes('P2024') ||
|
|
591
|
+
error.message?.includes('status code 408') ||
|
|
592
|
+
error.message?.includes('status code 502') ||
|
|
593
|
+
error.message?.includes('status code 503') ||
|
|
594
|
+
error.message?.includes('status code 504') ||
|
|
579
595
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
580
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
596
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
597
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
598
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
599
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
581
600
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
582
601
|
retryCount++;
|
|
583
602
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -684,12 +703,31 @@ export const Allocation = {
|
|
|
684
703
|
});
|
|
685
704
|
throw error;
|
|
686
705
|
}
|
|
687
|
-
// Check if this is a database connection error that we should retry
|
|
706
|
+
// Check if this is a database connection error that we should retry.
|
|
707
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
708
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
709
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
688
710
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
689
711
|
error.message?.includes('Cannot reach database server') ||
|
|
690
712
|
error.message?.includes('Connection timed out') ||
|
|
713
|
+
error.message?.includes('aborted due to timeout') ||
|
|
714
|
+
error.message?.includes('TimeoutError') ||
|
|
715
|
+
error.message?.includes('fetch failed') ||
|
|
716
|
+
error.message?.includes('socket hang up') ||
|
|
717
|
+
error.message?.includes('ECONNRESET') ||
|
|
718
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
719
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
720
|
+
error.message?.includes('Connection pool timeout') ||
|
|
721
|
+
error.message?.includes('P2024') ||
|
|
722
|
+
error.message?.includes('status code 408') ||
|
|
723
|
+
error.message?.includes('status code 502') ||
|
|
724
|
+
error.message?.includes('status code 503') ||
|
|
725
|
+
error.message?.includes('status code 504') ||
|
|
691
726
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
692
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
727
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
728
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
729
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
730
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
693
731
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
694
732
|
retryCount++;
|
|
695
733
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -2545,12 +2583,31 @@ export const Allocation = {
|
|
|
2545
2583
|
});
|
|
2546
2584
|
throw error;
|
|
2547
2585
|
}
|
|
2548
|
-
// Check if this is a database connection error that we should retry
|
|
2586
|
+
// Check if this is a database connection error that we should retry.
|
|
2587
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
2588
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
2589
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
2549
2590
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
2550
2591
|
error.message?.includes('Cannot reach database server') ||
|
|
2551
2592
|
error.message?.includes('Connection timed out') ||
|
|
2593
|
+
error.message?.includes('aborted due to timeout') ||
|
|
2594
|
+
error.message?.includes('TimeoutError') ||
|
|
2595
|
+
error.message?.includes('fetch failed') ||
|
|
2596
|
+
error.message?.includes('socket hang up') ||
|
|
2597
|
+
error.message?.includes('ECONNRESET') ||
|
|
2598
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
2599
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
2600
|
+
error.message?.includes('Connection pool timeout') ||
|
|
2601
|
+
error.message?.includes('P2024') ||
|
|
2602
|
+
error.message?.includes('status code 408') ||
|
|
2603
|
+
error.message?.includes('status code 502') ||
|
|
2604
|
+
error.message?.includes('status code 503') ||
|
|
2605
|
+
error.message?.includes('status code 504') ||
|
|
2552
2606
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
2553
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
2607
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
2608
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
2609
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
2610
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
2554
2611
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
2555
2612
|
retryCount++;
|
|
2556
2613
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -4856,12 +4913,31 @@ export const Allocation = {
|
|
|
4856
4913
|
});
|
|
4857
4914
|
throw error;
|
|
4858
4915
|
}
|
|
4859
|
-
// Check if this is a database connection error that we should retry
|
|
4916
|
+
// Check if this is a database connection error that we should retry.
|
|
4917
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
4918
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
4919
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
4860
4920
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
4861
4921
|
error.message?.includes('Cannot reach database server') ||
|
|
4862
4922
|
error.message?.includes('Connection timed out') ||
|
|
4923
|
+
error.message?.includes('aborted due to timeout') ||
|
|
4924
|
+
error.message?.includes('TimeoutError') ||
|
|
4925
|
+
error.message?.includes('fetch failed') ||
|
|
4926
|
+
error.message?.includes('socket hang up') ||
|
|
4927
|
+
error.message?.includes('ECONNRESET') ||
|
|
4928
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
4929
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
4930
|
+
error.message?.includes('Connection pool timeout') ||
|
|
4931
|
+
error.message?.includes('P2024') ||
|
|
4932
|
+
error.message?.includes('status code 408') ||
|
|
4933
|
+
error.message?.includes('status code 502') ||
|
|
4934
|
+
error.message?.includes('status code 503') ||
|
|
4935
|
+
error.message?.includes('status code 504') ||
|
|
4863
4936
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
4864
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
4937
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
4938
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
4939
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
4940
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
4865
4941
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4866
4942
|
retryCount++;
|
|
4867
4943
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -6709,12 +6785,31 @@ export const Allocation = {
|
|
|
6709
6785
|
});
|
|
6710
6786
|
throw error;
|
|
6711
6787
|
}
|
|
6712
|
-
// Check if this is a database connection error that we should retry
|
|
6788
|
+
// Check if this is a database connection error that we should retry.
|
|
6789
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
6790
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
6791
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
6713
6792
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
6714
6793
|
error.message?.includes('Cannot reach database server') ||
|
|
6715
6794
|
error.message?.includes('Connection timed out') ||
|
|
6795
|
+
error.message?.includes('aborted due to timeout') ||
|
|
6796
|
+
error.message?.includes('TimeoutError') ||
|
|
6797
|
+
error.message?.includes('fetch failed') ||
|
|
6798
|
+
error.message?.includes('socket hang up') ||
|
|
6799
|
+
error.message?.includes('ECONNRESET') ||
|
|
6800
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
6801
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
6802
|
+
error.message?.includes('Connection pool timeout') ||
|
|
6803
|
+
error.message?.includes('P2024') ||
|
|
6804
|
+
error.message?.includes('status code 408') ||
|
|
6805
|
+
error.message?.includes('status code 502') ||
|
|
6806
|
+
error.message?.includes('status code 503') ||
|
|
6807
|
+
error.message?.includes('status code 504') ||
|
|
6716
6808
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
6717
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
6809
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
6810
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
6811
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
6812
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
6718
6813
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
6719
6814
|
retryCount++;
|
|
6720
6815
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -6816,12 +6911,31 @@ export const Allocation = {
|
|
|
6816
6911
|
});
|
|
6817
6912
|
throw error;
|
|
6818
6913
|
}
|
|
6819
|
-
// Check if this is a database connection error that we should retry
|
|
6914
|
+
// Check if this is a database connection error that we should retry.
|
|
6915
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
6916
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
6917
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
6820
6918
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
6821
6919
|
error.message?.includes('Cannot reach database server') ||
|
|
6822
6920
|
error.message?.includes('Connection timed out') ||
|
|
6921
|
+
error.message?.includes('aborted due to timeout') ||
|
|
6922
|
+
error.message?.includes('TimeoutError') ||
|
|
6923
|
+
error.message?.includes('fetch failed') ||
|
|
6924
|
+
error.message?.includes('socket hang up') ||
|
|
6925
|
+
error.message?.includes('ECONNRESET') ||
|
|
6926
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
6927
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
6928
|
+
error.message?.includes('Connection pool timeout') ||
|
|
6929
|
+
error.message?.includes('P2024') ||
|
|
6930
|
+
error.message?.includes('status code 408') ||
|
|
6931
|
+
error.message?.includes('status code 502') ||
|
|
6932
|
+
error.message?.includes('status code 503') ||
|
|
6933
|
+
error.message?.includes('status code 504') ||
|
|
6823
6934
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
6824
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
6935
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
6936
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
6937
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
6938
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
6825
6939
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
6826
6940
|
retryCount++;
|
|
6827
6941
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -6900,12 +7014,31 @@ export const Allocation = {
|
|
|
6900
7014
|
if (error.message === 'No Allocation found') {
|
|
6901
7015
|
return null;
|
|
6902
7016
|
}
|
|
6903
|
-
// Check if this is a database connection error that we should retry
|
|
7017
|
+
// Check if this is a database connection error that we should retry.
|
|
7018
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
7019
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
7020
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
6904
7021
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
6905
7022
|
error.message?.includes('Cannot reach database server') ||
|
|
6906
7023
|
error.message?.includes('Connection timed out') ||
|
|
7024
|
+
error.message?.includes('aborted due to timeout') ||
|
|
7025
|
+
error.message?.includes('TimeoutError') ||
|
|
7026
|
+
error.message?.includes('fetch failed') ||
|
|
7027
|
+
error.message?.includes('socket hang up') ||
|
|
7028
|
+
error.message?.includes('ECONNRESET') ||
|
|
7029
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
7030
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
7031
|
+
error.message?.includes('Connection pool timeout') ||
|
|
7032
|
+
error.message?.includes('P2024') ||
|
|
7033
|
+
error.message?.includes('status code 408') ||
|
|
7034
|
+
error.message?.includes('status code 502') ||
|
|
7035
|
+
error.message?.includes('status code 503') ||
|
|
7036
|
+
error.message?.includes('status code 504') ||
|
|
6907
7037
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
6908
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
7038
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
7039
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
7040
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
7041
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
6909
7042
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
6910
7043
|
retryCount++;
|
|
6911
7044
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -6972,12 +7105,31 @@ export const Allocation = {
|
|
|
6972
7105
|
if (error.message === 'No Allocation found') {
|
|
6973
7106
|
return null;
|
|
6974
7107
|
}
|
|
6975
|
-
// Check if this is a database connection error that we should retry
|
|
7108
|
+
// Check if this is a database connection error that we should retry.
|
|
7109
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
7110
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
7111
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
6976
7112
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
6977
7113
|
error.message?.includes('Cannot reach database server') ||
|
|
6978
7114
|
error.message?.includes('Connection timed out') ||
|
|
7115
|
+
error.message?.includes('aborted due to timeout') ||
|
|
7116
|
+
error.message?.includes('TimeoutError') ||
|
|
7117
|
+
error.message?.includes('fetch failed') ||
|
|
7118
|
+
error.message?.includes('socket hang up') ||
|
|
7119
|
+
error.message?.includes('ECONNRESET') ||
|
|
7120
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
7121
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
7122
|
+
error.message?.includes('Connection pool timeout') ||
|
|
7123
|
+
error.message?.includes('P2024') ||
|
|
7124
|
+
error.message?.includes('status code 408') ||
|
|
7125
|
+
error.message?.includes('status code 502') ||
|
|
7126
|
+
error.message?.includes('status code 503') ||
|
|
7127
|
+
error.message?.includes('status code 504') ||
|
|
6979
7128
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
6980
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
7129
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
7130
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
7131
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
7132
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
6981
7133
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
6982
7134
|
retryCount++;
|
|
6983
7135
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -7068,12 +7220,31 @@ export const Allocation = {
|
|
|
7068
7220
|
if (error.message === 'No Allocation found') {
|
|
7069
7221
|
return null;
|
|
7070
7222
|
}
|
|
7071
|
-
// Check if this is a database connection error that we should retry
|
|
7223
|
+
// Check if this is a database connection error that we should retry.
|
|
7224
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
7225
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
7226
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
7072
7227
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
7073
7228
|
error.message?.includes('Cannot reach database server') ||
|
|
7074
7229
|
error.message?.includes('Connection timed out') ||
|
|
7230
|
+
error.message?.includes('aborted due to timeout') ||
|
|
7231
|
+
error.message?.includes('TimeoutError') ||
|
|
7232
|
+
error.message?.includes('fetch failed') ||
|
|
7233
|
+
error.message?.includes('socket hang up') ||
|
|
7234
|
+
error.message?.includes('ECONNRESET') ||
|
|
7235
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
7236
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
7237
|
+
error.message?.includes('Connection pool timeout') ||
|
|
7238
|
+
error.message?.includes('P2024') ||
|
|
7239
|
+
error.message?.includes('status code 408') ||
|
|
7240
|
+
error.message?.includes('status code 502') ||
|
|
7241
|
+
error.message?.includes('status code 503') ||
|
|
7242
|
+
error.message?.includes('status code 504') ||
|
|
7075
7243
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
7076
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
7244
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
7245
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
7246
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
7247
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
7077
7248
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
7078
7249
|
retryCount++;
|
|
7079
7250
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlpacaAccount.d.ts","sourceRoot":"","sources":["../../src/AlpacaAccount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACzG,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAoJpG,eAAO,MAAM,aAAa;IAExB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,iBAAiB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"AlpacaAccount.d.ts","sourceRoot":"","sources":["../../src/AlpacaAccount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACzG,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAoJpG,eAAO,MAAM,aAAa;IAExB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,iBAAiB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAomB5H;;;;;;;OAOG;sBACqB,iBAAiB,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;IA4J/K;;;;;;OAMG;kBACiB,iBAAiB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwgD1H;;;;;;OAMG;kBACiB,iBAAiB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAw+D1H;;;;;;OAMG;sBACqB,iBAAiB,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAugDvI;;;;;;OAMG;kBACiB,iBAAiB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwI1H;;;;;;;OAOG;eACc,iBAAiB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,GAAG,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IA+GhJ;;;;;OAKG;0BACyB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,iBAAiB,EAAE,GAAG,IAAI,CAAC;IAiGzG;;;;;;;OAOG;oBACmB,iBAAiB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,GAAG,GAAG,OAAO,CAAC,iBAAiB,EAAE,GAAG,IAAI,CAAC;CA2HxJ,CAAC"}
|