@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
|
@@ -73,7 +73,7 @@ exports.InstitutionalSentimentHistory = {
|
|
|
73
73
|
* @returns The created InstitutionalSentimentHistory or null.
|
|
74
74
|
*/
|
|
75
75
|
async create(props, globalClient) {
|
|
76
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
76
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
77
77
|
// Maximum number of retries for database connection issues
|
|
78
78
|
const MAX_RETRIES = 3;
|
|
79
79
|
let retryCount = 0;
|
|
@@ -182,12 +182,31 @@ exports.InstitutionalSentimentHistory = {
|
|
|
182
182
|
});
|
|
183
183
|
throw error;
|
|
184
184
|
}
|
|
185
|
-
// Check if this is a database connection error that we should retry
|
|
185
|
+
// Check if this is a database connection error that we should retry.
|
|
186
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
187
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
188
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
186
189
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
187
190
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
188
191
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
189
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
190
|
-
(
|
|
192
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
193
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
194
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
195
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
196
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
197
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
198
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
199
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
200
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
201
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
202
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
203
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
204
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
205
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
206
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
207
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
208
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
209
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
191
210
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
192
211
|
retryCount++;
|
|
193
212
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -222,7 +241,7 @@ exports.InstitutionalSentimentHistory = {
|
|
|
222
241
|
* @returns The count of created records or null.
|
|
223
242
|
*/
|
|
224
243
|
async createMany(props, globalClient, options) {
|
|
225
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
244
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
226
245
|
// Maximum number of retries for database connection issues
|
|
227
246
|
const MAX_RETRIES = 3;
|
|
228
247
|
let retryCount = 0;
|
|
@@ -330,12 +349,31 @@ exports.InstitutionalSentimentHistory = {
|
|
|
330
349
|
});
|
|
331
350
|
throw error;
|
|
332
351
|
}
|
|
333
|
-
// Check if this is a database connection error that we should retry
|
|
352
|
+
// Check if this is a database connection error that we should retry.
|
|
353
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
354
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
355
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
334
356
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
335
357
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
336
358
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
337
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
338
|
-
(
|
|
359
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
360
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
361
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
362
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
363
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
364
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
365
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
366
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
367
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
368
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
369
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
370
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
371
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
372
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
373
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
374
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
375
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
376
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
339
377
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
340
378
|
retryCount++;
|
|
341
379
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -369,7 +407,7 @@ exports.InstitutionalSentimentHistory = {
|
|
|
369
407
|
* @returns The updated InstitutionalSentimentHistory or null.
|
|
370
408
|
*/
|
|
371
409
|
async update(props, globalClient) {
|
|
372
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
410
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
373
411
|
// Maximum number of retries for database connection issues
|
|
374
412
|
const MAX_RETRIES = 3;
|
|
375
413
|
let retryCount = 0;
|
|
@@ -578,12 +616,31 @@ exports.InstitutionalSentimentHistory = {
|
|
|
578
616
|
});
|
|
579
617
|
throw error;
|
|
580
618
|
}
|
|
581
|
-
// Check if this is a database connection error that we should retry
|
|
619
|
+
// Check if this is a database connection error that we should retry.
|
|
620
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
621
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
622
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
582
623
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
583
624
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
584
625
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
585
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
586
|
-
(
|
|
626
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
627
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
628
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
629
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
630
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
631
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
632
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
633
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
634
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
635
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
636
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
637
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
638
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
639
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
640
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
641
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
642
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
643
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
587
644
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
588
645
|
retryCount++;
|
|
589
646
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -619,7 +676,7 @@ exports.InstitutionalSentimentHistory = {
|
|
|
619
676
|
* @returns The updated InstitutionalSentimentHistory or null.
|
|
620
677
|
*/
|
|
621
678
|
async upsert(props, globalClient) {
|
|
622
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
679
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
623
680
|
// Maximum number of retries for database connection issues
|
|
624
681
|
const MAX_RETRIES = 3;
|
|
625
682
|
let retryCount = 0;
|
|
@@ -868,12 +925,31 @@ exports.InstitutionalSentimentHistory = {
|
|
|
868
925
|
});
|
|
869
926
|
throw error;
|
|
870
927
|
}
|
|
871
|
-
// Check if this is a database connection error that we should retry
|
|
928
|
+
// Check if this is a database connection error that we should retry.
|
|
929
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
930
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
931
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
872
932
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
873
933
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
874
934
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
875
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
876
|
-
(
|
|
935
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
936
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
937
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
938
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
939
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
940
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
941
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
942
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
943
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
944
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
945
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
946
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
947
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
948
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
949
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
950
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
951
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
952
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
877
953
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
878
954
|
retryCount++;
|
|
879
955
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -909,7 +985,7 @@ exports.InstitutionalSentimentHistory = {
|
|
|
909
985
|
* @returns The count of created records or null.
|
|
910
986
|
*/
|
|
911
987
|
async updateMany(props, globalClient) {
|
|
912
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
988
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
913
989
|
// Maximum number of retries for database connection issues
|
|
914
990
|
const MAX_RETRIES = 3;
|
|
915
991
|
let retryCount = 0;
|
|
@@ -1117,12 +1193,31 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1117
1193
|
});
|
|
1118
1194
|
throw error;
|
|
1119
1195
|
}
|
|
1120
|
-
// Check if this is a database connection error that we should retry
|
|
1196
|
+
// Check if this is a database connection error that we should retry.
|
|
1197
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
1198
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
1199
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
1121
1200
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
1122
1201
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
1123
1202
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
1124
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
1125
|
-
(
|
|
1203
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
1204
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
1205
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
1206
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
1207
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
1208
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
1209
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
1210
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
1211
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
1212
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
1213
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
1214
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
1215
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
1216
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1217
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
1218
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
1219
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
1220
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
1126
1221
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1127
1222
|
retryCount++;
|
|
1128
1223
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -1156,7 +1251,7 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1156
1251
|
* @returns The deleted InstitutionalSentimentHistory or null.
|
|
1157
1252
|
*/
|
|
1158
1253
|
async delete(props, globalClient) {
|
|
1159
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
1254
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
1160
1255
|
// Maximum number of retries for database connection issues
|
|
1161
1256
|
const MAX_RETRIES = 3;
|
|
1162
1257
|
let retryCount = 0;
|
|
@@ -1225,12 +1320,31 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1225
1320
|
});
|
|
1226
1321
|
throw error;
|
|
1227
1322
|
}
|
|
1228
|
-
// Check if this is a database connection error that we should retry
|
|
1323
|
+
// Check if this is a database connection error that we should retry.
|
|
1324
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
1325
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
1326
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
1229
1327
|
const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
|
|
1230
1328
|
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
|
|
1231
1329
|
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
|
|
1232
|
-
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('
|
|
1233
|
-
(
|
|
1330
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('aborted due to timeout')) ||
|
|
1331
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('TimeoutError')) ||
|
|
1332
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('fetch failed')) ||
|
|
1333
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('socket hang up')) ||
|
|
1334
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ECONNRESET')) ||
|
|
1335
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('ECONNREFUSED')) ||
|
|
1336
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('ETIMEDOUT')) ||
|
|
1337
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('Connection pool timeout')) ||
|
|
1338
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('P2024')) ||
|
|
1339
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 408')) ||
|
|
1340
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 502')) ||
|
|
1341
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('status code 503')) ||
|
|
1342
|
+
((_2 = error.message) === null || _2 === void 0 ? void 0 : _2.includes('status code 504')) ||
|
|
1343
|
+
((_3 = error.message) === null || _3 === void 0 ? void 0 : _3.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1344
|
+
(error.networkError && (((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('Failed to fetch')) ||
|
|
1345
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('fetch failed')) ||
|
|
1346
|
+
((_6 = error.networkError.message) === null || _6 === void 0 ? void 0 : _6.includes('aborted due to timeout')) ||
|
|
1347
|
+
((_7 = error.networkError.message) === null || _7 === void 0 ? void 0 : _7.includes('TimeoutError'))));
|
|
1234
1348
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1235
1349
|
retryCount++;
|
|
1236
1350
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -1267,7 +1381,7 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1267
1381
|
* @returns The retrieved InstitutionalSentimentHistory or null.
|
|
1268
1382
|
*/
|
|
1269
1383
|
async get(props, globalClient, whereInput) {
|
|
1270
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1384
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
1271
1385
|
// Maximum number of retries for database connection issues
|
|
1272
1386
|
const MAX_RETRIES = 3;
|
|
1273
1387
|
let retryCount = 0;
|
|
@@ -1312,12 +1426,31 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1312
1426
|
if (error.message === 'No InstitutionalSentimentHistory found') {
|
|
1313
1427
|
return null;
|
|
1314
1428
|
}
|
|
1315
|
-
// Check if this is a database connection error that we should retry
|
|
1429
|
+
// Check if this is a database connection error that we should retry.
|
|
1430
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
1431
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
1432
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
1316
1433
|
const isConnectionError = ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Server has closed the connection')) ||
|
|
1317
1434
|
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Cannot reach database server')) ||
|
|
1318
1435
|
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('Connection timed out')) ||
|
|
1319
|
-
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('
|
|
1320
|
-
(
|
|
1436
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('aborted due to timeout')) ||
|
|
1437
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('TimeoutError')) ||
|
|
1438
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('fetch failed')) ||
|
|
1439
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('socket hang up')) ||
|
|
1440
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('ECONNRESET')) ||
|
|
1441
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('ECONNREFUSED')) ||
|
|
1442
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('ETIMEDOUT')) ||
|
|
1443
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Connection pool timeout')) ||
|
|
1444
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('P2024')) ||
|
|
1445
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('status code 408')) ||
|
|
1446
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('status code 502')) ||
|
|
1447
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('status code 503')) ||
|
|
1448
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('status code 504')) ||
|
|
1449
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1450
|
+
(error.networkError && (((_v = error.networkError.message) === null || _v === void 0 ? void 0 : _v.includes('Failed to fetch')) ||
|
|
1451
|
+
((_w = error.networkError.message) === null || _w === void 0 ? void 0 : _w.includes('fetch failed')) ||
|
|
1452
|
+
((_x = error.networkError.message) === null || _x === void 0 ? void 0 : _x.includes('aborted due to timeout')) ||
|
|
1453
|
+
((_y = error.networkError.message) === null || _y === void 0 ? void 0 : _y.includes('TimeoutError'))));
|
|
1321
1454
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1322
1455
|
retryCount++;
|
|
1323
1456
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -1350,7 +1483,7 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1350
1483
|
* @returns An array of InstitutionalSentimentHistory records or null.
|
|
1351
1484
|
*/
|
|
1352
1485
|
async getAll(globalClient) {
|
|
1353
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1486
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
1354
1487
|
// Maximum number of retries for database connection issues
|
|
1355
1488
|
const MAX_RETRIES = 3;
|
|
1356
1489
|
let retryCount = 0;
|
|
@@ -1385,12 +1518,31 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1385
1518
|
if (error.message === 'No InstitutionalSentimentHistory found') {
|
|
1386
1519
|
return null;
|
|
1387
1520
|
}
|
|
1388
|
-
// Check if this is a database connection error that we should retry
|
|
1521
|
+
// Check if this is a database connection error that we should retry.
|
|
1522
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
1523
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
1524
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
1389
1525
|
const isConnectionError = ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Server has closed the connection')) ||
|
|
1390
1526
|
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Cannot reach database server')) ||
|
|
1391
1527
|
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('Connection timed out')) ||
|
|
1392
|
-
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('
|
|
1393
|
-
(
|
|
1528
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('aborted due to timeout')) ||
|
|
1529
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('TimeoutError')) ||
|
|
1530
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('fetch failed')) ||
|
|
1531
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('socket hang up')) ||
|
|
1532
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('ECONNRESET')) ||
|
|
1533
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('ECONNREFUSED')) ||
|
|
1534
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('ETIMEDOUT')) ||
|
|
1535
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Connection pool timeout')) ||
|
|
1536
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('P2024')) ||
|
|
1537
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('status code 408')) ||
|
|
1538
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('status code 502')) ||
|
|
1539
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('status code 503')) ||
|
|
1540
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('status code 504')) ||
|
|
1541
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1542
|
+
(error.networkError && (((_v = error.networkError.message) === null || _v === void 0 ? void 0 : _v.includes('Failed to fetch')) ||
|
|
1543
|
+
((_w = error.networkError.message) === null || _w === void 0 ? void 0 : _w.includes('fetch failed')) ||
|
|
1544
|
+
((_x = error.networkError.message) === null || _x === void 0 ? void 0 : _x.includes('aborted due to timeout')) ||
|
|
1545
|
+
((_y = error.networkError.message) === null || _y === void 0 ? void 0 : _y.includes('TimeoutError'))));
|
|
1394
1546
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1395
1547
|
retryCount++;
|
|
1396
1548
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -1425,7 +1577,7 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1425
1577
|
* @returns An array of found InstitutionalSentimentHistory records or null.
|
|
1426
1578
|
*/
|
|
1427
1579
|
async findMany(props, globalClient, whereInput) {
|
|
1428
|
-
var _a, _b, _c, _d, _e;
|
|
1580
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
1429
1581
|
// Maximum number of retries for database connection issues
|
|
1430
1582
|
const MAX_RETRIES = 3;
|
|
1431
1583
|
let retryCount = 0;
|
|
@@ -1482,12 +1634,31 @@ exports.InstitutionalSentimentHistory = {
|
|
|
1482
1634
|
if (error.message === 'No InstitutionalSentimentHistory found') {
|
|
1483
1635
|
return null;
|
|
1484
1636
|
}
|
|
1485
|
-
// Check if this is a database connection error that we should retry
|
|
1637
|
+
// Check if this is a database connection error that we should retry.
|
|
1638
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
1639
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
1640
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
1486
1641
|
const isConnectionError = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('Server has closed the connection')) ||
|
|
1487
1642
|
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('Cannot reach database server')) ||
|
|
1488
1643
|
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Connection timed out')) ||
|
|
1489
|
-
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('
|
|
1490
|
-
(
|
|
1644
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('aborted due to timeout')) ||
|
|
1645
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('TimeoutError')) ||
|
|
1646
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('fetch failed')) ||
|
|
1647
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('socket hang up')) ||
|
|
1648
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('ECONNRESET')) ||
|
|
1649
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('ECONNREFUSED')) ||
|
|
1650
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('ETIMEDOUT')) ||
|
|
1651
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Connection pool timeout')) ||
|
|
1652
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('P2024')) ||
|
|
1653
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('status code 408')) ||
|
|
1654
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('status code 502')) ||
|
|
1655
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('status code 503')) ||
|
|
1656
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('status code 504')) ||
|
|
1657
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1658
|
+
(error.networkError && (((_t = error.networkError.message) === null || _t === void 0 ? void 0 : _t.includes('Failed to fetch')) ||
|
|
1659
|
+
((_u = error.networkError.message) === null || _u === void 0 ? void 0 : _u.includes('fetch failed')) ||
|
|
1660
|
+
((_v = error.networkError.message) === null || _v === void 0 ? void 0 : _v.includes('aborted due to timeout')) ||
|
|
1661
|
+
((_w = error.networkError.message) === null || _w === void 0 ? void 0 : _w.includes('TimeoutError'))));
|
|
1491
1662
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1492
1663
|
retryCount++;
|
|
1493
1664
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|