@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/SignalLineage.cjs
CHANGED
|
@@ -55,7 +55,7 @@ exports.SignalLineage = {
|
|
|
55
55
|
* @returns The created SignalLineage or null.
|
|
56
56
|
*/
|
|
57
57
|
async create(props, globalClient) {
|
|
58
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
58
|
+
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;
|
|
59
59
|
// Maximum number of retries for database connection issues
|
|
60
60
|
const MAX_RETRIES = 3;
|
|
61
61
|
let retryCount = 0;
|
|
@@ -147,12 +147,31 @@ exports.SignalLineage = {
|
|
|
147
147
|
});
|
|
148
148
|
throw error;
|
|
149
149
|
}
|
|
150
|
-
// Check if this is a database connection error that we should retry
|
|
150
|
+
// Check if this is a database connection error that we should retry.
|
|
151
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
152
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
153
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
151
154
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
152
155
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
153
156
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
154
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
155
|
-
(
|
|
157
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
158
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
159
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
160
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
161
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
162
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
163
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
164
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
165
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
166
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
167
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
168
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
169
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
170
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
171
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
172
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
173
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
174
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
156
175
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
157
176
|
retryCount++;
|
|
158
177
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -187,7 +206,7 @@ exports.SignalLineage = {
|
|
|
187
206
|
* @returns The count of created records or null.
|
|
188
207
|
*/
|
|
189
208
|
async createMany(props, globalClient, options) {
|
|
190
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
209
|
+
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;
|
|
191
210
|
// Maximum number of retries for database connection issues
|
|
192
211
|
const MAX_RETRIES = 3;
|
|
193
212
|
let retryCount = 0;
|
|
@@ -278,12 +297,31 @@ exports.SignalLineage = {
|
|
|
278
297
|
});
|
|
279
298
|
throw error;
|
|
280
299
|
}
|
|
281
|
-
// Check if this is a database connection error that we should retry
|
|
300
|
+
// Check if this is a database connection error that we should retry.
|
|
301
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
302
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
303
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
282
304
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
283
305
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
284
306
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
285
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
286
|
-
(
|
|
307
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
308
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
309
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
310
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
311
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
312
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
313
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
314
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
315
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
316
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
317
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
318
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
319
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
320
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
321
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
322
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
323
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
324
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
287
325
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
288
326
|
retryCount++;
|
|
289
327
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -317,7 +355,7 @@ exports.SignalLineage = {
|
|
|
317
355
|
* @returns The updated SignalLineage or null.
|
|
318
356
|
*/
|
|
319
357
|
async update(props, globalClient) {
|
|
320
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
358
|
+
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;
|
|
321
359
|
// Maximum number of retries for database connection issues
|
|
322
360
|
const MAX_RETRIES = 3;
|
|
323
361
|
let retryCount = 0;
|
|
@@ -446,12 +484,31 @@ exports.SignalLineage = {
|
|
|
446
484
|
});
|
|
447
485
|
throw error;
|
|
448
486
|
}
|
|
449
|
-
// Check if this is a database connection error that we should retry
|
|
487
|
+
// Check if this is a database connection error that we should retry.
|
|
488
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
489
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
490
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
450
491
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
451
492
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
452
493
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
453
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
454
|
-
(
|
|
494
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
495
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
496
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
497
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
498
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
499
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
500
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
501
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
502
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
503
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
504
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
505
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
506
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
507
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
508
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
509
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
510
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
511
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
455
512
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
456
513
|
retryCount++;
|
|
457
514
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -487,7 +544,7 @@ exports.SignalLineage = {
|
|
|
487
544
|
* @returns The updated SignalLineage or null.
|
|
488
545
|
*/
|
|
489
546
|
async upsert(props, globalClient) {
|
|
490
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
547
|
+
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;
|
|
491
548
|
// Maximum number of retries for database connection issues
|
|
492
549
|
const MAX_RETRIES = 3;
|
|
493
550
|
let retryCount = 0;
|
|
@@ -646,12 +703,31 @@ exports.SignalLineage = {
|
|
|
646
703
|
});
|
|
647
704
|
throw error;
|
|
648
705
|
}
|
|
649
|
-
// 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).
|
|
650
710
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
651
711
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
652
712
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
653
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
654
|
-
(
|
|
713
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
714
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
715
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
716
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
717
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
718
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
719
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
720
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
721
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
722
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
723
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
724
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
725
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
726
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
727
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
728
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
729
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
730
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
655
731
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
656
732
|
retryCount++;
|
|
657
733
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -687,7 +763,7 @@ exports.SignalLineage = {
|
|
|
687
763
|
* @returns The count of created records or null.
|
|
688
764
|
*/
|
|
689
765
|
async updateMany(props, globalClient) {
|
|
690
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
766
|
+
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;
|
|
691
767
|
// Maximum number of retries for database connection issues
|
|
692
768
|
const MAX_RETRIES = 3;
|
|
693
769
|
let retryCount = 0;
|
|
@@ -815,12 +891,31 @@ exports.SignalLineage = {
|
|
|
815
891
|
});
|
|
816
892
|
throw error;
|
|
817
893
|
}
|
|
818
|
-
// Check if this is a database connection error that we should retry
|
|
894
|
+
// Check if this is a database connection error that we should retry.
|
|
895
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
896
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
897
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
819
898
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
820
899
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
821
900
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
822
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
823
|
-
(
|
|
901
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
902
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
903
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
904
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
905
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
906
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
907
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
908
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
909
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
910
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
911
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
912
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
913
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
914
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
915
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
916
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
917
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
918
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
824
919
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
825
920
|
retryCount++;
|
|
826
921
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -854,7 +949,7 @@ exports.SignalLineage = {
|
|
|
854
949
|
* @returns The deleted SignalLineage or null.
|
|
855
950
|
*/
|
|
856
951
|
async delete(props, globalClient) {
|
|
857
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
952
|
+
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;
|
|
858
953
|
// Maximum number of retries for database connection issues
|
|
859
954
|
const MAX_RETRIES = 3;
|
|
860
955
|
let retryCount = 0;
|
|
@@ -923,12 +1018,31 @@ exports.SignalLineage = {
|
|
|
923
1018
|
});
|
|
924
1019
|
throw error;
|
|
925
1020
|
}
|
|
926
|
-
// Check if this is a database connection error that we should retry
|
|
1021
|
+
// Check if this is a database connection error that we should retry.
|
|
1022
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
1023
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
1024
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
927
1025
|
const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
|
|
928
1026
|
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
|
|
929
1027
|
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
|
|
930
|
-
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('
|
|
931
|
-
(
|
|
1028
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('aborted due to timeout')) ||
|
|
1029
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('TimeoutError')) ||
|
|
1030
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('fetch failed')) ||
|
|
1031
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('socket hang up')) ||
|
|
1032
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ECONNRESET')) ||
|
|
1033
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('ECONNREFUSED')) ||
|
|
1034
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('ETIMEDOUT')) ||
|
|
1035
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('Connection pool timeout')) ||
|
|
1036
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('P2024')) ||
|
|
1037
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 408')) ||
|
|
1038
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 502')) ||
|
|
1039
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('status code 503')) ||
|
|
1040
|
+
((_2 = error.message) === null || _2 === void 0 ? void 0 : _2.includes('status code 504')) ||
|
|
1041
|
+
((_3 = error.message) === null || _3 === void 0 ? void 0 : _3.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1042
|
+
(error.networkError && (((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('Failed to fetch')) ||
|
|
1043
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('fetch failed')) ||
|
|
1044
|
+
((_6 = error.networkError.message) === null || _6 === void 0 ? void 0 : _6.includes('aborted due to timeout')) ||
|
|
1045
|
+
((_7 = error.networkError.message) === null || _7 === void 0 ? void 0 : _7.includes('TimeoutError'))));
|
|
932
1046
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
933
1047
|
retryCount++;
|
|
934
1048
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -965,7 +1079,7 @@ exports.SignalLineage = {
|
|
|
965
1079
|
* @returns The retrieved SignalLineage or null.
|
|
966
1080
|
*/
|
|
967
1081
|
async get(props, globalClient, whereInput) {
|
|
968
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1082
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
969
1083
|
// Maximum number of retries for database connection issues
|
|
970
1084
|
const MAX_RETRIES = 3;
|
|
971
1085
|
let retryCount = 0;
|
|
@@ -1014,12 +1128,31 @@ exports.SignalLineage = {
|
|
|
1014
1128
|
if (error.message === 'No SignalLineage found') {
|
|
1015
1129
|
return null;
|
|
1016
1130
|
}
|
|
1017
|
-
// Check if this is a database connection error that we should retry
|
|
1131
|
+
// Check if this is a database connection error that we should retry.
|
|
1132
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
1133
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
1134
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
1018
1135
|
const isConnectionError = ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Server has closed the connection')) ||
|
|
1019
1136
|
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Cannot reach database server')) ||
|
|
1020
1137
|
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('Connection timed out')) ||
|
|
1021
|
-
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('
|
|
1022
|
-
(
|
|
1138
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('aborted due to timeout')) ||
|
|
1139
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('TimeoutError')) ||
|
|
1140
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('fetch failed')) ||
|
|
1141
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('socket hang up')) ||
|
|
1142
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('ECONNRESET')) ||
|
|
1143
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('ECONNREFUSED')) ||
|
|
1144
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('ETIMEDOUT')) ||
|
|
1145
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Connection pool timeout')) ||
|
|
1146
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('P2024')) ||
|
|
1147
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('status code 408')) ||
|
|
1148
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('status code 502')) ||
|
|
1149
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('status code 503')) ||
|
|
1150
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('status code 504')) ||
|
|
1151
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1152
|
+
(error.networkError && (((_v = error.networkError.message) === null || _v === void 0 ? void 0 : _v.includes('Failed to fetch')) ||
|
|
1153
|
+
((_w = error.networkError.message) === null || _w === void 0 ? void 0 : _w.includes('fetch failed')) ||
|
|
1154
|
+
((_x = error.networkError.message) === null || _x === void 0 ? void 0 : _x.includes('aborted due to timeout')) ||
|
|
1155
|
+
((_y = error.networkError.message) === null || _y === void 0 ? void 0 : _y.includes('TimeoutError'))));
|
|
1023
1156
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1024
1157
|
retryCount++;
|
|
1025
1158
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -1052,7 +1185,7 @@ exports.SignalLineage = {
|
|
|
1052
1185
|
* @returns An array of SignalLineage records or null.
|
|
1053
1186
|
*/
|
|
1054
1187
|
async getAll(globalClient) {
|
|
1055
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1188
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
1056
1189
|
// Maximum number of retries for database connection issues
|
|
1057
1190
|
const MAX_RETRIES = 3;
|
|
1058
1191
|
let retryCount = 0;
|
|
@@ -1087,12 +1220,31 @@ exports.SignalLineage = {
|
|
|
1087
1220
|
if (error.message === 'No SignalLineage found') {
|
|
1088
1221
|
return null;
|
|
1089
1222
|
}
|
|
1090
|
-
// Check if this is a database connection error that we should retry
|
|
1223
|
+
// Check if this is a database connection error that we should retry.
|
|
1224
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
1225
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
1226
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
1091
1227
|
const isConnectionError = ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Server has closed the connection')) ||
|
|
1092
1228
|
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Cannot reach database server')) ||
|
|
1093
1229
|
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('Connection timed out')) ||
|
|
1094
|
-
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('
|
|
1095
|
-
(
|
|
1230
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('aborted due to timeout')) ||
|
|
1231
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('TimeoutError')) ||
|
|
1232
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('fetch failed')) ||
|
|
1233
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('socket hang up')) ||
|
|
1234
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('ECONNRESET')) ||
|
|
1235
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('ECONNREFUSED')) ||
|
|
1236
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('ETIMEDOUT')) ||
|
|
1237
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Connection pool timeout')) ||
|
|
1238
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('P2024')) ||
|
|
1239
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('status code 408')) ||
|
|
1240
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('status code 502')) ||
|
|
1241
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('status code 503')) ||
|
|
1242
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('status code 504')) ||
|
|
1243
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1244
|
+
(error.networkError && (((_v = error.networkError.message) === null || _v === void 0 ? void 0 : _v.includes('Failed to fetch')) ||
|
|
1245
|
+
((_w = error.networkError.message) === null || _w === void 0 ? void 0 : _w.includes('fetch failed')) ||
|
|
1246
|
+
((_x = error.networkError.message) === null || _x === void 0 ? void 0 : _x.includes('aborted due to timeout')) ||
|
|
1247
|
+
((_y = error.networkError.message) === null || _y === void 0 ? void 0 : _y.includes('TimeoutError'))));
|
|
1096
1248
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1097
1249
|
retryCount++;
|
|
1098
1250
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -1127,7 +1279,7 @@ exports.SignalLineage = {
|
|
|
1127
1279
|
* @returns An array of found SignalLineage records or null.
|
|
1128
1280
|
*/
|
|
1129
1281
|
async findMany(props, globalClient, whereInput) {
|
|
1130
|
-
var _a, _b, _c, _d, _e;
|
|
1282
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
1131
1283
|
// Maximum number of retries for database connection issues
|
|
1132
1284
|
const MAX_RETRIES = 3;
|
|
1133
1285
|
let retryCount = 0;
|
|
@@ -1190,12 +1342,31 @@ exports.SignalLineage = {
|
|
|
1190
1342
|
if (error.message === 'No SignalLineage found') {
|
|
1191
1343
|
return null;
|
|
1192
1344
|
}
|
|
1193
|
-
// Check if this is a database connection error that we should retry
|
|
1345
|
+
// Check if this is a database connection error that we should retry.
|
|
1346
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
1347
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
1348
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
1194
1349
|
const isConnectionError = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('Server has closed the connection')) ||
|
|
1195
1350
|
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('Cannot reach database server')) ||
|
|
1196
1351
|
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Connection timed out')) ||
|
|
1197
|
-
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('
|
|
1198
|
-
(
|
|
1352
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('aborted due to timeout')) ||
|
|
1353
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('TimeoutError')) ||
|
|
1354
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('fetch failed')) ||
|
|
1355
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('socket hang up')) ||
|
|
1356
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('ECONNRESET')) ||
|
|
1357
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('ECONNREFUSED')) ||
|
|
1358
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('ETIMEDOUT')) ||
|
|
1359
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Connection pool timeout')) ||
|
|
1360
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('P2024')) ||
|
|
1361
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('status code 408')) ||
|
|
1362
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('status code 502')) ||
|
|
1363
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('status code 503')) ||
|
|
1364
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('status code 504')) ||
|
|
1365
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1366
|
+
(error.networkError && (((_t = error.networkError.message) === null || _t === void 0 ? void 0 : _t.includes('Failed to fetch')) ||
|
|
1367
|
+
((_u = error.networkError.message) === null || _u === void 0 ? void 0 : _u.includes('fetch failed')) ||
|
|
1368
|
+
((_v = error.networkError.message) === null || _v === void 0 ? void 0 : _v.includes('aborted due to timeout')) ||
|
|
1369
|
+
((_w = error.networkError.message) === null || _w === void 0 ? void 0 : _w.includes('TimeoutError'))));
|
|
1199
1370
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1200
1371
|
retryCount++;
|
|
1201
1372
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|