@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
|
@@ -319,12 +319,31 @@ export const InstitutionalFlowSignal = {
|
|
|
319
319
|
});
|
|
320
320
|
throw error;
|
|
321
321
|
}
|
|
322
|
-
// Check if this is a database connection error that we should retry
|
|
322
|
+
// Check if this is a database connection error that we should retry.
|
|
323
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
324
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
325
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
323
326
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
324
327
|
error.message?.includes('Cannot reach database server') ||
|
|
325
328
|
error.message?.includes('Connection timed out') ||
|
|
329
|
+
error.message?.includes('aborted due to timeout') ||
|
|
330
|
+
error.message?.includes('TimeoutError') ||
|
|
331
|
+
error.message?.includes('fetch failed') ||
|
|
332
|
+
error.message?.includes('socket hang up') ||
|
|
333
|
+
error.message?.includes('ECONNRESET') ||
|
|
334
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
335
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
336
|
+
error.message?.includes('Connection pool timeout') ||
|
|
337
|
+
error.message?.includes('P2024') ||
|
|
338
|
+
error.message?.includes('status code 408') ||
|
|
339
|
+
error.message?.includes('status code 502') ||
|
|
340
|
+
error.message?.includes('status code 503') ||
|
|
341
|
+
error.message?.includes('status code 504') ||
|
|
326
342
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
327
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
343
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
344
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
345
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
346
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
328
347
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
329
348
|
retryCount++;
|
|
330
349
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -429,12 +448,31 @@ export const InstitutionalFlowSignal = {
|
|
|
429
448
|
});
|
|
430
449
|
throw error;
|
|
431
450
|
}
|
|
432
|
-
// Check if this is a database connection error that we should retry
|
|
451
|
+
// Check if this is a database connection error that we should retry.
|
|
452
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
453
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
454
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
433
455
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
434
456
|
error.message?.includes('Cannot reach database server') ||
|
|
435
457
|
error.message?.includes('Connection timed out') ||
|
|
458
|
+
error.message?.includes('aborted due to timeout') ||
|
|
459
|
+
error.message?.includes('TimeoutError') ||
|
|
460
|
+
error.message?.includes('fetch failed') ||
|
|
461
|
+
error.message?.includes('socket hang up') ||
|
|
462
|
+
error.message?.includes('ECONNRESET') ||
|
|
463
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
464
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
465
|
+
error.message?.includes('Connection pool timeout') ||
|
|
466
|
+
error.message?.includes('P2024') ||
|
|
467
|
+
error.message?.includes('status code 408') ||
|
|
468
|
+
error.message?.includes('status code 502') ||
|
|
469
|
+
error.message?.includes('status code 503') ||
|
|
470
|
+
error.message?.includes('status code 504') ||
|
|
436
471
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
437
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
472
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
473
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
474
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
475
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
438
476
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
439
477
|
retryCount++;
|
|
440
478
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -1104,12 +1142,31 @@ export const InstitutionalFlowSignal = {
|
|
|
1104
1142
|
});
|
|
1105
1143
|
throw error;
|
|
1106
1144
|
}
|
|
1107
|
-
// Check if this is a database connection error that we should retry
|
|
1145
|
+
// Check if this is a database connection error that we should retry.
|
|
1146
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
1147
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
1148
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
1108
1149
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
1109
1150
|
error.message?.includes('Cannot reach database server') ||
|
|
1110
1151
|
error.message?.includes('Connection timed out') ||
|
|
1152
|
+
error.message?.includes('aborted due to timeout') ||
|
|
1153
|
+
error.message?.includes('TimeoutError') ||
|
|
1154
|
+
error.message?.includes('fetch failed') ||
|
|
1155
|
+
error.message?.includes('socket hang up') ||
|
|
1156
|
+
error.message?.includes('ECONNRESET') ||
|
|
1157
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
1158
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
1159
|
+
error.message?.includes('Connection pool timeout') ||
|
|
1160
|
+
error.message?.includes('P2024') ||
|
|
1161
|
+
error.message?.includes('status code 408') ||
|
|
1162
|
+
error.message?.includes('status code 502') ||
|
|
1163
|
+
error.message?.includes('status code 503') ||
|
|
1164
|
+
error.message?.includes('status code 504') ||
|
|
1111
1165
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
1112
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
1166
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
1167
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
1168
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
1169
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
1113
1170
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1114
1171
|
retryCount++;
|
|
1115
1172
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -1943,12 +2000,31 @@ export const InstitutionalFlowSignal = {
|
|
|
1943
2000
|
});
|
|
1944
2001
|
throw error;
|
|
1945
2002
|
}
|
|
1946
|
-
// Check if this is a database connection error that we should retry
|
|
2003
|
+
// Check if this is a database connection error that we should retry.
|
|
2004
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
2005
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
2006
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
1947
2007
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
1948
2008
|
error.message?.includes('Cannot reach database server') ||
|
|
1949
2009
|
error.message?.includes('Connection timed out') ||
|
|
2010
|
+
error.message?.includes('aborted due to timeout') ||
|
|
2011
|
+
error.message?.includes('TimeoutError') ||
|
|
2012
|
+
error.message?.includes('fetch failed') ||
|
|
2013
|
+
error.message?.includes('socket hang up') ||
|
|
2014
|
+
error.message?.includes('ECONNRESET') ||
|
|
2015
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
2016
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
2017
|
+
error.message?.includes('Connection pool timeout') ||
|
|
2018
|
+
error.message?.includes('P2024') ||
|
|
2019
|
+
error.message?.includes('status code 408') ||
|
|
2020
|
+
error.message?.includes('status code 502') ||
|
|
2021
|
+
error.message?.includes('status code 503') ||
|
|
2022
|
+
error.message?.includes('status code 504') ||
|
|
1950
2023
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
1951
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
2024
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
2025
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
2026
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
2027
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
1952
2028
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1953
2029
|
retryCount++;
|
|
1954
2030
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -2619,12 +2695,31 @@ export const InstitutionalFlowSignal = {
|
|
|
2619
2695
|
});
|
|
2620
2696
|
throw error;
|
|
2621
2697
|
}
|
|
2622
|
-
// Check if this is a database connection error that we should retry
|
|
2698
|
+
// Check if this is a database connection error that we should retry.
|
|
2699
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
2700
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
2701
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
2623
2702
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
2624
2703
|
error.message?.includes('Cannot reach database server') ||
|
|
2625
2704
|
error.message?.includes('Connection timed out') ||
|
|
2705
|
+
error.message?.includes('aborted due to timeout') ||
|
|
2706
|
+
error.message?.includes('TimeoutError') ||
|
|
2707
|
+
error.message?.includes('fetch failed') ||
|
|
2708
|
+
error.message?.includes('socket hang up') ||
|
|
2709
|
+
error.message?.includes('ECONNRESET') ||
|
|
2710
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
2711
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
2712
|
+
error.message?.includes('Connection pool timeout') ||
|
|
2713
|
+
error.message?.includes('P2024') ||
|
|
2714
|
+
error.message?.includes('status code 408') ||
|
|
2715
|
+
error.message?.includes('status code 502') ||
|
|
2716
|
+
error.message?.includes('status code 503') ||
|
|
2717
|
+
error.message?.includes('status code 504') ||
|
|
2626
2718
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
2627
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
2719
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
2720
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
2721
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
2722
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
2628
2723
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
2629
2724
|
retryCount++;
|
|
2630
2725
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -2726,12 +2821,31 @@ export const InstitutionalFlowSignal = {
|
|
|
2726
2821
|
});
|
|
2727
2822
|
throw error;
|
|
2728
2823
|
}
|
|
2729
|
-
// Check if this is a database connection error that we should retry
|
|
2824
|
+
// Check if this is a database connection error that we should retry.
|
|
2825
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
2826
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
2827
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
2730
2828
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
2731
2829
|
error.message?.includes('Cannot reach database server') ||
|
|
2732
2830
|
error.message?.includes('Connection timed out') ||
|
|
2831
|
+
error.message?.includes('aborted due to timeout') ||
|
|
2832
|
+
error.message?.includes('TimeoutError') ||
|
|
2833
|
+
error.message?.includes('fetch failed') ||
|
|
2834
|
+
error.message?.includes('socket hang up') ||
|
|
2835
|
+
error.message?.includes('ECONNRESET') ||
|
|
2836
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
2837
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
2838
|
+
error.message?.includes('Connection pool timeout') ||
|
|
2839
|
+
error.message?.includes('P2024') ||
|
|
2840
|
+
error.message?.includes('status code 408') ||
|
|
2841
|
+
error.message?.includes('status code 502') ||
|
|
2842
|
+
error.message?.includes('status code 503') ||
|
|
2843
|
+
error.message?.includes('status code 504') ||
|
|
2733
2844
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
2734
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
2845
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
2846
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
2847
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
2848
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
2735
2849
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
2736
2850
|
retryCount++;
|
|
2737
2851
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -2812,12 +2926,31 @@ export const InstitutionalFlowSignal = {
|
|
|
2812
2926
|
if (error.message === 'No InstitutionalFlowSignal found') {
|
|
2813
2927
|
return null;
|
|
2814
2928
|
}
|
|
2815
|
-
// Check if this is a database connection error that we should retry
|
|
2929
|
+
// Check if this is a database connection error that we should retry.
|
|
2930
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
2931
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
2932
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
2816
2933
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
2817
2934
|
error.message?.includes('Cannot reach database server') ||
|
|
2818
2935
|
error.message?.includes('Connection timed out') ||
|
|
2936
|
+
error.message?.includes('aborted due to timeout') ||
|
|
2937
|
+
error.message?.includes('TimeoutError') ||
|
|
2938
|
+
error.message?.includes('fetch failed') ||
|
|
2939
|
+
error.message?.includes('socket hang up') ||
|
|
2940
|
+
error.message?.includes('ECONNRESET') ||
|
|
2941
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
2942
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
2943
|
+
error.message?.includes('Connection pool timeout') ||
|
|
2944
|
+
error.message?.includes('P2024') ||
|
|
2945
|
+
error.message?.includes('status code 408') ||
|
|
2946
|
+
error.message?.includes('status code 502') ||
|
|
2947
|
+
error.message?.includes('status code 503') ||
|
|
2948
|
+
error.message?.includes('status code 504') ||
|
|
2819
2949
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
2820
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
2950
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
2951
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
2952
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
2953
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
2821
2954
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
2822
2955
|
retryCount++;
|
|
2823
2956
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -2884,12 +3017,31 @@ export const InstitutionalFlowSignal = {
|
|
|
2884
3017
|
if (error.message === 'No InstitutionalFlowSignal found') {
|
|
2885
3018
|
return null;
|
|
2886
3019
|
}
|
|
2887
|
-
// Check if this is a database connection error that we should retry
|
|
3020
|
+
// Check if this is a database connection error that we should retry.
|
|
3021
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
3022
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
3023
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
2888
3024
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
2889
3025
|
error.message?.includes('Cannot reach database server') ||
|
|
2890
3026
|
error.message?.includes('Connection timed out') ||
|
|
3027
|
+
error.message?.includes('aborted due to timeout') ||
|
|
3028
|
+
error.message?.includes('TimeoutError') ||
|
|
3029
|
+
error.message?.includes('fetch failed') ||
|
|
3030
|
+
error.message?.includes('socket hang up') ||
|
|
3031
|
+
error.message?.includes('ECONNRESET') ||
|
|
3032
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
3033
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
3034
|
+
error.message?.includes('Connection pool timeout') ||
|
|
3035
|
+
error.message?.includes('P2024') ||
|
|
3036
|
+
error.message?.includes('status code 408') ||
|
|
3037
|
+
error.message?.includes('status code 502') ||
|
|
3038
|
+
error.message?.includes('status code 503') ||
|
|
3039
|
+
error.message?.includes('status code 504') ||
|
|
2891
3040
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
2892
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
3041
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
3042
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
3043
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
3044
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
2893
3045
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
2894
3046
|
retryCount++;
|
|
2895
3047
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -2980,12 +3132,31 @@ export const InstitutionalFlowSignal = {
|
|
|
2980
3132
|
if (error.message === 'No InstitutionalFlowSignal found') {
|
|
2981
3133
|
return null;
|
|
2982
3134
|
}
|
|
2983
|
-
// Check if this is a database connection error that we should retry
|
|
3135
|
+
// Check if this is a database connection error that we should retry.
|
|
3136
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
3137
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
3138
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
2984
3139
|
const isConnectionError = error.message?.includes('Server has closed the connection') ||
|
|
2985
3140
|
error.message?.includes('Cannot reach database server') ||
|
|
2986
3141
|
error.message?.includes('Connection timed out') ||
|
|
3142
|
+
error.message?.includes('aborted due to timeout') ||
|
|
3143
|
+
error.message?.includes('TimeoutError') ||
|
|
3144
|
+
error.message?.includes('fetch failed') ||
|
|
3145
|
+
error.message?.includes('socket hang up') ||
|
|
3146
|
+
error.message?.includes('ECONNRESET') ||
|
|
3147
|
+
error.message?.includes('ECONNREFUSED') ||
|
|
3148
|
+
error.message?.includes('ETIMEDOUT') ||
|
|
3149
|
+
error.message?.includes('Connection pool timeout') ||
|
|
3150
|
+
error.message?.includes('P2024') ||
|
|
3151
|
+
error.message?.includes('status code 408') ||
|
|
3152
|
+
error.message?.includes('status code 502') ||
|
|
3153
|
+
error.message?.includes('status code 503') ||
|
|
3154
|
+
error.message?.includes('status code 504') ||
|
|
2987
3155
|
error.message?.includes('Accelerate') || // Prisma Accelerate proxy errors
|
|
2988
|
-
(error.networkError && error.networkError.message?.includes('Failed to fetch')
|
|
3156
|
+
(error.networkError && (error.networkError.message?.includes('Failed to fetch') ||
|
|
3157
|
+
error.networkError.message?.includes('fetch failed') ||
|
|
3158
|
+
error.networkError.message?.includes('aborted due to timeout') ||
|
|
3159
|
+
error.networkError.message?.includes('TimeoutError')));
|
|
2989
3160
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
2990
3161
|
retryCount++;
|
|
2991
3162
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstitutionalHolding.d.ts","sourceRoot":"","sources":["../../src/InstitutionalHolding.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,IAAI,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AAC9H,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAsFpG,eAAO,MAAM,oBAAoB;IAE/B;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,wBAAwB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"InstitutionalHolding.d.ts","sourceRoot":"","sources":["../../src/InstitutionalHolding.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,IAAI,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AAC9H,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAsFpG,eAAO,MAAM,oBAAoB;IAE/B;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,wBAAwB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAsS1I;;;;;;;OAOG;sBACqB,wBAAwB,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;IA2ItL;;;;;;OAMG;kBACiB,wBAAwB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,wBAAwB,CAAC;IA6rBxI;;;;;;OAMG;kBACiB,wBAAwB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,wBAAwB,CAAC;IA41BxI;;;;;;OAMG;sBACqB,wBAAwB,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IA4rB9I;;;;;;OAMG;kBACiB,wBAAwB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAwIxI;;;;;;;OAOG;eACc,wBAAwB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,GAAG,GAAG,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC;IA4G9J;;;;;OAKG;0BACyB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,wBAAwB,EAAE,GAAG,IAAI,CAAC;IAiGhH;;;;;;;OAOG;oBACmB,wBAAwB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,GAAG,GAAG,OAAO,CAAC,wBAAwB,EAAE,GAAG,IAAI,CAAC;CAwHtK,CAAC"}
|