@adaptic/backend-legacy 0.0.903 → 0.0.905
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 +291 -63
- package/Account.cjs +291 -63
- package/AccountLinkingRequest.cjs +291 -63
- package/Action.cjs +291 -63
- package/Alert.cjs +291 -63
- package/Allocation.cjs +291 -63
- package/AlpacaAccount.cjs +291 -63
- package/AnalyticsConfiguration.cjs +291 -63
- package/AnalyticsSnapshot.cjs +291 -63
- package/Asset.cjs +291 -63
- package/AuditLog.cjs +291 -63
- package/Authenticator.cjs +291 -63
- package/Configuration.cjs +291 -63
- package/ConflictEvent.cjs +291 -63
- package/ConnectionHealthSnapshot.cjs +291 -63
- package/Customer.cjs +291 -63
- package/DeadLetterMessage.cjs +291 -63
- package/EconomicEvent.cjs +291 -63
- package/Event.cjs +291 -63
- package/EventSnapshot.cjs +291 -63
- package/FeatureImportanceAnalysis.cjs +291 -63
- package/InstitutionalFlowSignal.cjs +291 -63
- package/InstitutionalHolding.cjs +291 -63
- package/InstitutionalSentimentAlerts.cjs +291 -63
- package/InstitutionalSentimentErrors.cjs +291 -63
- package/InstitutionalSentimentHistory.cjs +291 -63
- package/InstitutionalSentimentMetrics.cjs +291 -63
- package/InviteToken.cjs +291 -63
- package/LinkedProvider.cjs +291 -63
- package/MLTrainingData.cjs +291 -63
- package/MarketSentiment.cjs +291 -63
- package/ModelArtifact.cjs +291 -63
- package/ModelVersion.cjs +291 -63
- package/ModelVersionArtifact.cjs +291 -63
- package/NewsArticle.cjs +291 -63
- package/NewsArticleAssetSentiment.cjs +291 -63
- package/OptionsContract.cjs +291 -63
- package/OptionsGreeksHistory.cjs +291 -63
- package/OptionsPosition.cjs +291 -63
- package/OptionsTradeExecution.cjs +291 -63
- package/PortfolioGreeksHistory.cjs +291 -63
- package/ScheduledOptionOrder.cjs +291 -63
- package/Session.cjs +291 -63
- package/SignalGeneratorMetrics.cjs +291 -63
- package/SignalLineage.cjs +291 -63
- package/SignalOutcome.cjs +291 -63
- package/SignalPriorityQueue.cjs +291 -63
- package/SyncEvent.cjs +291 -63
- package/SystemAlert.cjs +291 -63
- package/Trade.cjs +291 -63
- package/TradeAuditEvent.cjs +291 -63
- package/TradeExecutionHistory.cjs +291 -63
- package/User.cjs +291 -63
- package/VerificationToken.cjs +291 -63
- package/WaitlistEntry.cjs +291 -63
- package/esm/ABTest.d.ts.map +1 -1
- package/esm/ABTest.js.map +1 -1
- package/esm/ABTest.mjs +255 -27
- package/esm/Account.d.ts.map +1 -1
- package/esm/Account.js.map +1 -1
- package/esm/Account.mjs +255 -27
- package/esm/AccountLinkingRequest.d.ts.map +1 -1
- package/esm/AccountLinkingRequest.js.map +1 -1
- package/esm/AccountLinkingRequest.mjs +255 -27
- package/esm/Action.d.ts.map +1 -1
- package/esm/Action.js.map +1 -1
- package/esm/Action.mjs +255 -27
- package/esm/Alert.d.ts.map +1 -1
- package/esm/Alert.js.map +1 -1
- package/esm/Alert.mjs +255 -27
- package/esm/Allocation.d.ts.map +1 -1
- package/esm/Allocation.js.map +1 -1
- package/esm/Allocation.mjs +255 -27
- package/esm/AlpacaAccount.d.ts.map +1 -1
- package/esm/AlpacaAccount.js.map +1 -1
- package/esm/AlpacaAccount.mjs +255 -27
- package/esm/AnalyticsConfiguration.d.ts.map +1 -1
- package/esm/AnalyticsConfiguration.js.map +1 -1
- package/esm/AnalyticsConfiguration.mjs +255 -27
- package/esm/AnalyticsSnapshot.d.ts.map +1 -1
- package/esm/AnalyticsSnapshot.js.map +1 -1
- package/esm/AnalyticsSnapshot.mjs +255 -27
- package/esm/Asset.d.ts.map +1 -1
- package/esm/Asset.js.map +1 -1
- package/esm/Asset.mjs +255 -27
- package/esm/AuditLog.d.ts.map +1 -1
- package/esm/AuditLog.js.map +1 -1
- package/esm/AuditLog.mjs +255 -27
- package/esm/Authenticator.d.ts.map +1 -1
- package/esm/Authenticator.js.map +1 -1
- package/esm/Authenticator.mjs +255 -27
- package/esm/Configuration.d.ts.map +1 -1
- package/esm/Configuration.js.map +1 -1
- package/esm/Configuration.mjs +255 -27
- package/esm/ConflictEvent.d.ts.map +1 -1
- package/esm/ConflictEvent.js.map +1 -1
- package/esm/ConflictEvent.mjs +255 -27
- package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
- package/esm/ConnectionHealthSnapshot.js.map +1 -1
- package/esm/ConnectionHealthSnapshot.mjs +255 -27
- package/esm/Customer.d.ts.map +1 -1
- package/esm/Customer.js.map +1 -1
- package/esm/Customer.mjs +255 -27
- package/esm/DeadLetterMessage.d.ts.map +1 -1
- package/esm/DeadLetterMessage.js.map +1 -1
- package/esm/DeadLetterMessage.mjs +255 -27
- package/esm/EconomicEvent.d.ts.map +1 -1
- package/esm/EconomicEvent.js.map +1 -1
- package/esm/EconomicEvent.mjs +255 -27
- package/esm/Event.d.ts.map +1 -1
- package/esm/Event.js.map +1 -1
- package/esm/Event.mjs +255 -27
- package/esm/EventSnapshot.d.ts.map +1 -1
- package/esm/EventSnapshot.js.map +1 -1
- package/esm/EventSnapshot.mjs +255 -27
- package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
- package/esm/FeatureImportanceAnalysis.js.map +1 -1
- package/esm/FeatureImportanceAnalysis.mjs +255 -27
- package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
- package/esm/InstitutionalFlowSignal.js.map +1 -1
- package/esm/InstitutionalFlowSignal.mjs +255 -27
- package/esm/InstitutionalHolding.d.ts.map +1 -1
- package/esm/InstitutionalHolding.js.map +1 -1
- package/esm/InstitutionalHolding.mjs +255 -27
- package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
- package/esm/InstitutionalSentimentAlerts.js.map +1 -1
- package/esm/InstitutionalSentimentAlerts.mjs +255 -27
- package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
- package/esm/InstitutionalSentimentErrors.js.map +1 -1
- package/esm/InstitutionalSentimentErrors.mjs +255 -27
- package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
- package/esm/InstitutionalSentimentHistory.js.map +1 -1
- package/esm/InstitutionalSentimentHistory.mjs +255 -27
- package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
- package/esm/InstitutionalSentimentMetrics.js.map +1 -1
- package/esm/InstitutionalSentimentMetrics.mjs +255 -27
- package/esm/InviteToken.d.ts.map +1 -1
- package/esm/InviteToken.js.map +1 -1
- package/esm/InviteToken.mjs +255 -27
- package/esm/LinkedProvider.d.ts.map +1 -1
- package/esm/LinkedProvider.js.map +1 -1
- package/esm/LinkedProvider.mjs +255 -27
- package/esm/MLTrainingData.d.ts.map +1 -1
- package/esm/MLTrainingData.js.map +1 -1
- package/esm/MLTrainingData.mjs +255 -27
- package/esm/MarketSentiment.d.ts.map +1 -1
- package/esm/MarketSentiment.js.map +1 -1
- package/esm/MarketSentiment.mjs +255 -27
- package/esm/ModelArtifact.d.ts.map +1 -1
- package/esm/ModelArtifact.js.map +1 -1
- package/esm/ModelArtifact.mjs +255 -27
- package/esm/ModelVersion.d.ts.map +1 -1
- package/esm/ModelVersion.js.map +1 -1
- package/esm/ModelVersion.mjs +255 -27
- package/esm/ModelVersionArtifact.d.ts.map +1 -1
- package/esm/ModelVersionArtifact.js.map +1 -1
- package/esm/ModelVersionArtifact.mjs +255 -27
- package/esm/NewsArticle.d.ts.map +1 -1
- package/esm/NewsArticle.js.map +1 -1
- package/esm/NewsArticle.mjs +255 -27
- package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/esm/NewsArticleAssetSentiment.js.map +1 -1
- package/esm/NewsArticleAssetSentiment.mjs +255 -27
- package/esm/OptionsContract.d.ts.map +1 -1
- package/esm/OptionsContract.js.map +1 -1
- package/esm/OptionsContract.mjs +255 -27
- package/esm/OptionsGreeksHistory.d.ts.map +1 -1
- package/esm/OptionsGreeksHistory.js.map +1 -1
- package/esm/OptionsGreeksHistory.mjs +255 -27
- package/esm/OptionsPosition.d.ts.map +1 -1
- package/esm/OptionsPosition.js.map +1 -1
- package/esm/OptionsPosition.mjs +255 -27
- package/esm/OptionsTradeExecution.d.ts.map +1 -1
- package/esm/OptionsTradeExecution.js.map +1 -1
- package/esm/OptionsTradeExecution.mjs +255 -27
- package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
- package/esm/PortfolioGreeksHistory.js.map +1 -1
- package/esm/PortfolioGreeksHistory.mjs +255 -27
- package/esm/ScheduledOptionOrder.d.ts.map +1 -1
- package/esm/ScheduledOptionOrder.js.map +1 -1
- package/esm/ScheduledOptionOrder.mjs +255 -27
- package/esm/Session.d.ts.map +1 -1
- package/esm/Session.js.map +1 -1
- package/esm/Session.mjs +255 -27
- package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
- package/esm/SignalGeneratorMetrics.js.map +1 -1
- package/esm/SignalGeneratorMetrics.mjs +255 -27
- package/esm/SignalLineage.d.ts.map +1 -1
- package/esm/SignalLineage.js.map +1 -1
- package/esm/SignalLineage.mjs +255 -27
- package/esm/SignalOutcome.d.ts.map +1 -1
- package/esm/SignalOutcome.js.map +1 -1
- package/esm/SignalOutcome.mjs +255 -27
- package/esm/SignalPriorityQueue.d.ts.map +1 -1
- package/esm/SignalPriorityQueue.js.map +1 -1
- package/esm/SignalPriorityQueue.mjs +255 -27
- package/esm/SyncEvent.d.ts.map +1 -1
- package/esm/SyncEvent.js.map +1 -1
- package/esm/SyncEvent.mjs +255 -27
- package/esm/SystemAlert.d.ts.map +1 -1
- package/esm/SystemAlert.js.map +1 -1
- package/esm/SystemAlert.mjs +255 -27
- package/esm/Trade.d.ts.map +1 -1
- package/esm/Trade.js.map +1 -1
- package/esm/Trade.mjs +255 -27
- package/esm/TradeAuditEvent.d.ts.map +1 -1
- package/esm/TradeAuditEvent.js.map +1 -1
- package/esm/TradeAuditEvent.mjs +255 -27
- package/esm/TradeExecutionHistory.d.ts.map +1 -1
- package/esm/TradeExecutionHistory.js.map +1 -1
- package/esm/TradeExecutionHistory.mjs +255 -27
- package/esm/User.d.ts.map +1 -1
- package/esm/User.js.map +1 -1
- package/esm/User.mjs +255 -27
- package/esm/VerificationToken.d.ts.map +1 -1
- package/esm/VerificationToken.js.map +1 -1
- package/esm/VerificationToken.mjs +255 -27
- package/esm/WaitlistEntry.d.ts.map +1 -1
- package/esm/WaitlistEntry.js.map +1 -1
- package/esm/WaitlistEntry.mjs +255 -27
- package/esm/middleware/audit-logger.d.ts +0 -7
- package/esm/middleware/audit-logger.d.ts.map +1 -1
- package/esm/middleware/audit-logger.js.map +1 -1
- package/esm/middleware/audit-logger.mjs +5 -3
- package/esm/prismaClient.d.ts.map +1 -1
- package/esm/prismaClient.js.map +1 -1
- package/esm/prismaClient.mjs +38 -9
- package/package.json +1 -1
- package/prismaClient.cjs +38 -9
|
@@ -34,7 +34,7 @@ exports.ConnectionHealthSnapshot = {
|
|
|
34
34
|
* @returns The created ConnectionHealthSnapshot or null.
|
|
35
35
|
*/
|
|
36
36
|
async create(props, globalClient) {
|
|
37
|
-
var _a, _b, _c, _d, _e;
|
|
37
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
38
38
|
// Maximum number of retries for database connection issues
|
|
39
39
|
const MAX_RETRIES = 3;
|
|
40
40
|
let retryCount = 0;
|
|
@@ -84,21 +84,52 @@ exports.ConnectionHealthSnapshot = {
|
|
|
84
84
|
}
|
|
85
85
|
catch (error) {
|
|
86
86
|
lastError = error;
|
|
87
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
88
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
89
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
90
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
91
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
92
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
93
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
94
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
95
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
96
|
+
if (isConstraintViolation) {
|
|
97
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
98
|
+
logger_1.logger.error("Non-retryable constraint violation in createOneConnectionHealthSnapshot", {
|
|
99
|
+
operation: 'createOneConnectionHealthSnapshot',
|
|
100
|
+
model: 'ConnectionHealthSnapshot',
|
|
101
|
+
error: String(error),
|
|
102
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
103
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
104
|
+
isRetryable: false,
|
|
105
|
+
});
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
87
108
|
// Check if this is a database connection error that we should retry
|
|
88
|
-
const isConnectionError = ((
|
|
89
|
-
((
|
|
90
|
-
((
|
|
91
|
-
((
|
|
92
|
-
(error.networkError && ((
|
|
109
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
110
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
111
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
112
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
113
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
93
114
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
94
115
|
retryCount++;
|
|
95
116
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
96
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
117
|
+
logger_1.logger.warn("Database connection error in createOneConnectionHealthSnapshot, retrying...", {
|
|
118
|
+
operation: 'createOneConnectionHealthSnapshot',
|
|
119
|
+
model: 'ConnectionHealthSnapshot',
|
|
120
|
+
attempt: retryCount,
|
|
121
|
+
maxRetries: MAX_RETRIES,
|
|
122
|
+
});
|
|
97
123
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
98
124
|
continue;
|
|
99
125
|
}
|
|
100
|
-
// Log
|
|
101
|
-
logger_1.logger.error("Database
|
|
126
|
+
// Log structured error details and rethrow
|
|
127
|
+
logger_1.logger.error("Database create operation failed", {
|
|
128
|
+
operation: 'createOneConnectionHealthSnapshot',
|
|
129
|
+
model: 'ConnectionHealthSnapshot',
|
|
130
|
+
error: String(error),
|
|
131
|
+
isRetryable: isConnectionError,
|
|
132
|
+
});
|
|
102
133
|
throw error;
|
|
103
134
|
}
|
|
104
135
|
}
|
|
@@ -113,7 +144,7 @@ exports.ConnectionHealthSnapshot = {
|
|
|
113
144
|
* @returns The count of created records or null.
|
|
114
145
|
*/
|
|
115
146
|
async createMany(props, globalClient) {
|
|
116
|
-
var _a, _b, _c, _d, _e;
|
|
147
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
117
148
|
// Maximum number of retries for database connection issues
|
|
118
149
|
const MAX_RETRIES = 3;
|
|
119
150
|
let retryCount = 0;
|
|
@@ -162,21 +193,52 @@ exports.ConnectionHealthSnapshot = {
|
|
|
162
193
|
}
|
|
163
194
|
catch (error) {
|
|
164
195
|
lastError = error;
|
|
196
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
197
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
198
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
199
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
200
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
201
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
202
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
203
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
204
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
205
|
+
if (isConstraintViolation) {
|
|
206
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
207
|
+
logger_1.logger.error("Non-retryable constraint violation in createManyConnectionHealthSnapshot", {
|
|
208
|
+
operation: 'createManyConnectionHealthSnapshot',
|
|
209
|
+
model: 'ConnectionHealthSnapshot',
|
|
210
|
+
error: String(error),
|
|
211
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
212
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
213
|
+
isRetryable: false,
|
|
214
|
+
});
|
|
215
|
+
throw error;
|
|
216
|
+
}
|
|
165
217
|
// Check if this is a database connection error that we should retry
|
|
166
|
-
const isConnectionError = ((
|
|
167
|
-
((
|
|
168
|
-
((
|
|
169
|
-
((
|
|
170
|
-
(error.networkError && ((
|
|
218
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
219
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
220
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
221
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
222
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
171
223
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
172
224
|
retryCount++;
|
|
173
225
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
174
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
226
|
+
logger_1.logger.warn("Database connection error in createManyConnectionHealthSnapshot, retrying...", {
|
|
227
|
+
operation: 'createManyConnectionHealthSnapshot',
|
|
228
|
+
model: 'ConnectionHealthSnapshot',
|
|
229
|
+
attempt: retryCount,
|
|
230
|
+
maxRetries: MAX_RETRIES,
|
|
231
|
+
});
|
|
175
232
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
176
233
|
continue;
|
|
177
234
|
}
|
|
178
|
-
// Log
|
|
179
|
-
logger_1.logger.error("Database
|
|
235
|
+
// Log structured error details and rethrow
|
|
236
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
237
|
+
operation: 'createManyConnectionHealthSnapshot',
|
|
238
|
+
model: 'ConnectionHealthSnapshot',
|
|
239
|
+
error: String(error),
|
|
240
|
+
isRetryable: isConnectionError,
|
|
241
|
+
});
|
|
180
242
|
throw error;
|
|
181
243
|
}
|
|
182
244
|
}
|
|
@@ -191,7 +253,7 @@ exports.ConnectionHealthSnapshot = {
|
|
|
191
253
|
* @returns The updated ConnectionHealthSnapshot or null.
|
|
192
254
|
*/
|
|
193
255
|
async update(props, globalClient) {
|
|
194
|
-
var _a, _b, _c, _d, _e;
|
|
256
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
195
257
|
// Maximum number of retries for database connection issues
|
|
196
258
|
const MAX_RETRIES = 3;
|
|
197
259
|
let retryCount = 0;
|
|
@@ -261,21 +323,55 @@ exports.ConnectionHealthSnapshot = {
|
|
|
261
323
|
}
|
|
262
324
|
catch (error) {
|
|
263
325
|
lastError = error;
|
|
326
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
327
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
328
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
329
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
330
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
331
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
332
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
333
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
334
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
335
|
+
if (isConstraintViolation) {
|
|
336
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
337
|
+
logger_1.logger.error("Non-retryable constraint violation in updateOneConnectionHealthSnapshot", {
|
|
338
|
+
operation: 'updateOneConnectionHealthSnapshot',
|
|
339
|
+
model: 'ConnectionHealthSnapshot',
|
|
340
|
+
error: String(error),
|
|
341
|
+
recordId: props.id,
|
|
342
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
343
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
344
|
+
isRetryable: false,
|
|
345
|
+
});
|
|
346
|
+
throw error;
|
|
347
|
+
}
|
|
264
348
|
// Check if this is a database connection error that we should retry
|
|
265
|
-
const isConnectionError = ((
|
|
266
|
-
((
|
|
267
|
-
((
|
|
268
|
-
((
|
|
269
|
-
(error.networkError && ((
|
|
349
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
350
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
351
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
352
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
353
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
270
354
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
271
355
|
retryCount++;
|
|
272
356
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
273
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
357
|
+
logger_1.logger.warn("Database connection error in updateOneConnectionHealthSnapshot, retrying...", {
|
|
358
|
+
operation: 'updateOneConnectionHealthSnapshot',
|
|
359
|
+
model: 'ConnectionHealthSnapshot',
|
|
360
|
+
attempt: retryCount,
|
|
361
|
+
maxRetries: MAX_RETRIES,
|
|
362
|
+
recordId: props.id,
|
|
363
|
+
});
|
|
274
364
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
275
365
|
continue;
|
|
276
366
|
}
|
|
277
|
-
// Log
|
|
278
|
-
logger_1.logger.error("Database
|
|
367
|
+
// Log structured error details and rethrow
|
|
368
|
+
logger_1.logger.error("Database update operation failed", {
|
|
369
|
+
operation: 'updateOneConnectionHealthSnapshot',
|
|
370
|
+
model: 'ConnectionHealthSnapshot',
|
|
371
|
+
error: String(error),
|
|
372
|
+
recordId: props.id,
|
|
373
|
+
isRetryable: isConnectionError,
|
|
374
|
+
});
|
|
279
375
|
throw error;
|
|
280
376
|
}
|
|
281
377
|
}
|
|
@@ -290,7 +386,7 @@ exports.ConnectionHealthSnapshot = {
|
|
|
290
386
|
* @returns The updated ConnectionHealthSnapshot or null.
|
|
291
387
|
*/
|
|
292
388
|
async upsert(props, globalClient) {
|
|
293
|
-
var _a, _b, _c, _d, _e;
|
|
389
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
294
390
|
// Maximum number of retries for database connection issues
|
|
295
391
|
const MAX_RETRIES = 3;
|
|
296
392
|
let retryCount = 0;
|
|
@@ -362,21 +458,55 @@ exports.ConnectionHealthSnapshot = {
|
|
|
362
458
|
}
|
|
363
459
|
catch (error) {
|
|
364
460
|
lastError = error;
|
|
461
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
462
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
463
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
464
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
465
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
466
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
467
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
468
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
469
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
470
|
+
if (isConstraintViolation) {
|
|
471
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
472
|
+
logger_1.logger.error("Non-retryable constraint violation in upsertOneConnectionHealthSnapshot", {
|
|
473
|
+
operation: 'upsertOneConnectionHealthSnapshot',
|
|
474
|
+
model: 'ConnectionHealthSnapshot',
|
|
475
|
+
error: String(error),
|
|
476
|
+
recordId: props.id,
|
|
477
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
478
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
479
|
+
isRetryable: false,
|
|
480
|
+
});
|
|
481
|
+
throw error;
|
|
482
|
+
}
|
|
365
483
|
// Check if this is a database connection error that we should retry
|
|
366
|
-
const isConnectionError = ((
|
|
367
|
-
((
|
|
368
|
-
((
|
|
369
|
-
((
|
|
370
|
-
(error.networkError && ((
|
|
484
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
485
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
486
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
487
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
488
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
371
489
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
372
490
|
retryCount++;
|
|
373
491
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
374
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
492
|
+
logger_1.logger.warn("Database connection error in upsertOneConnectionHealthSnapshot, retrying...", {
|
|
493
|
+
operation: 'upsertOneConnectionHealthSnapshot',
|
|
494
|
+
model: 'ConnectionHealthSnapshot',
|
|
495
|
+
attempt: retryCount,
|
|
496
|
+
maxRetries: MAX_RETRIES,
|
|
497
|
+
recordId: props.id,
|
|
498
|
+
});
|
|
375
499
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
376
500
|
continue;
|
|
377
501
|
}
|
|
378
|
-
// Log
|
|
379
|
-
logger_1.logger.error("Database
|
|
502
|
+
// Log structured error details and rethrow
|
|
503
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
504
|
+
operation: 'upsertOneConnectionHealthSnapshot',
|
|
505
|
+
model: 'ConnectionHealthSnapshot',
|
|
506
|
+
error: String(error),
|
|
507
|
+
recordId: props.id,
|
|
508
|
+
isRetryable: isConnectionError,
|
|
509
|
+
});
|
|
380
510
|
throw error;
|
|
381
511
|
}
|
|
382
512
|
}
|
|
@@ -391,7 +521,7 @@ exports.ConnectionHealthSnapshot = {
|
|
|
391
521
|
* @returns The count of created records or null.
|
|
392
522
|
*/
|
|
393
523
|
async updateMany(props, globalClient) {
|
|
394
|
-
var _a, _b, _c, _d, _e;
|
|
524
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
395
525
|
// Maximum number of retries for database connection issues
|
|
396
526
|
const MAX_RETRIES = 3;
|
|
397
527
|
let retryCount = 0;
|
|
@@ -461,21 +591,52 @@ exports.ConnectionHealthSnapshot = {
|
|
|
461
591
|
}
|
|
462
592
|
catch (error) {
|
|
463
593
|
lastError = error;
|
|
594
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
595
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
596
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
597
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
598
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
599
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
600
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
601
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
602
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
603
|
+
if (isConstraintViolation) {
|
|
604
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
605
|
+
logger_1.logger.error("Non-retryable constraint violation in updateManyConnectionHealthSnapshot", {
|
|
606
|
+
operation: 'updateManyConnectionHealthSnapshot',
|
|
607
|
+
model: 'ConnectionHealthSnapshot',
|
|
608
|
+
error: String(error),
|
|
609
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
610
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
611
|
+
isRetryable: false,
|
|
612
|
+
});
|
|
613
|
+
throw error;
|
|
614
|
+
}
|
|
464
615
|
// Check if this is a database connection error that we should retry
|
|
465
|
-
const isConnectionError = ((
|
|
466
|
-
((
|
|
467
|
-
((
|
|
468
|
-
((
|
|
469
|
-
(error.networkError && ((
|
|
616
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
617
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
618
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
619
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
620
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
470
621
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
471
622
|
retryCount++;
|
|
472
623
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
473
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
624
|
+
logger_1.logger.warn("Database connection error in updateManyConnectionHealthSnapshot, retrying...", {
|
|
625
|
+
operation: 'updateManyConnectionHealthSnapshot',
|
|
626
|
+
model: 'ConnectionHealthSnapshot',
|
|
627
|
+
attempt: retryCount,
|
|
628
|
+
maxRetries: MAX_RETRIES,
|
|
629
|
+
});
|
|
474
630
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
475
631
|
continue;
|
|
476
632
|
}
|
|
477
|
-
// Log
|
|
478
|
-
logger_1.logger.error("Database
|
|
633
|
+
// Log structured error details and rethrow
|
|
634
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
635
|
+
operation: 'updateManyConnectionHealthSnapshot',
|
|
636
|
+
model: 'ConnectionHealthSnapshot',
|
|
637
|
+
error: String(error),
|
|
638
|
+
isRetryable: isConnectionError,
|
|
639
|
+
});
|
|
479
640
|
throw error;
|
|
480
641
|
}
|
|
481
642
|
}
|
|
@@ -490,7 +651,7 @@ exports.ConnectionHealthSnapshot = {
|
|
|
490
651
|
* @returns The deleted ConnectionHealthSnapshot or null.
|
|
491
652
|
*/
|
|
492
653
|
async delete(props, globalClient) {
|
|
493
|
-
var _a, _b, _c, _d, _e;
|
|
654
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
494
655
|
// Maximum number of retries for database connection issues
|
|
495
656
|
const MAX_RETRIES = 3;
|
|
496
657
|
let retryCount = 0;
|
|
@@ -534,21 +695,58 @@ exports.ConnectionHealthSnapshot = {
|
|
|
534
695
|
}
|
|
535
696
|
catch (error) {
|
|
536
697
|
lastError = error;
|
|
698
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
699
|
+
// (e.g., foreign key constraints preventing deletion)
|
|
700
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
701
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
702
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
703
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
704
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
705
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
706
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('23503')) ||
|
|
707
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2002')) ||
|
|
708
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('P2003')) ||
|
|
709
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('P2014'));
|
|
710
|
+
if (isConstraintViolation) {
|
|
711
|
+
const constraintMatch = (_l = error.message) === null || _l === void 0 ? void 0 : _l.match(/constraint\s+"([^"]+)"/);
|
|
712
|
+
logger_1.logger.error("Non-retryable constraint violation in deleteOneConnectionHealthSnapshot", {
|
|
713
|
+
operation: 'deleteOneConnectionHealthSnapshot',
|
|
714
|
+
model: 'ConnectionHealthSnapshot',
|
|
715
|
+
error: String(error),
|
|
716
|
+
recordId: props.id,
|
|
717
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
718
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
719
|
+
isRetryable: false,
|
|
720
|
+
});
|
|
721
|
+
throw error;
|
|
722
|
+
}
|
|
537
723
|
// Check if this is a database connection error that we should retry
|
|
538
|
-
const isConnectionError = ((
|
|
539
|
-
((
|
|
540
|
-
((
|
|
541
|
-
((
|
|
542
|
-
(error.networkError && ((
|
|
724
|
+
const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
|
|
725
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
|
|
726
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
|
|
727
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
728
|
+
(error.networkError && ((_r = error.networkError.message) === null || _r === void 0 ? void 0 : _r.includes('Failed to fetch')));
|
|
543
729
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
544
730
|
retryCount++;
|
|
545
731
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
546
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
732
|
+
logger_1.logger.warn("Database connection error in deleteOneConnectionHealthSnapshot, retrying...", {
|
|
733
|
+
operation: 'deleteOneConnectionHealthSnapshot',
|
|
734
|
+
model: 'ConnectionHealthSnapshot',
|
|
735
|
+
attempt: retryCount,
|
|
736
|
+
maxRetries: MAX_RETRIES,
|
|
737
|
+
recordId: props.id,
|
|
738
|
+
});
|
|
547
739
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
548
740
|
continue;
|
|
549
741
|
}
|
|
550
|
-
// Log
|
|
551
|
-
logger_1.logger.error("Database
|
|
742
|
+
// Log structured error details and rethrow
|
|
743
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
744
|
+
operation: 'deleteOneConnectionHealthSnapshot',
|
|
745
|
+
model: 'ConnectionHealthSnapshot',
|
|
746
|
+
error: String(error),
|
|
747
|
+
recordId: props.id,
|
|
748
|
+
isRetryable: isConnectionError,
|
|
749
|
+
});
|
|
552
750
|
throw error;
|
|
553
751
|
}
|
|
554
752
|
}
|
|
@@ -615,12 +813,22 @@ exports.ConnectionHealthSnapshot = {
|
|
|
615
813
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
616
814
|
retryCount++;
|
|
617
815
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
618
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
816
|
+
logger_1.logger.warn("Database connection error in getConnectionHealthSnapshot, retrying...", {
|
|
817
|
+
operation: 'getConnectionHealthSnapshot',
|
|
818
|
+
model: 'ConnectionHealthSnapshot',
|
|
819
|
+
attempt: retryCount,
|
|
820
|
+
maxRetries: MAX_RETRIES,
|
|
821
|
+
});
|
|
619
822
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
620
823
|
continue;
|
|
621
824
|
}
|
|
622
|
-
// Log
|
|
623
|
-
logger_1.logger.error("Database
|
|
825
|
+
// Log structured error details and rethrow
|
|
826
|
+
logger_1.logger.error("Database get operation failed", {
|
|
827
|
+
operation: 'getConnectionHealthSnapshot',
|
|
828
|
+
model: 'ConnectionHealthSnapshot',
|
|
829
|
+
error: String(error),
|
|
830
|
+
isRetryable: isConnectionError,
|
|
831
|
+
});
|
|
624
832
|
throw error;
|
|
625
833
|
}
|
|
626
834
|
}
|
|
@@ -678,12 +886,22 @@ exports.ConnectionHealthSnapshot = {
|
|
|
678
886
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
679
887
|
retryCount++;
|
|
680
888
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
681
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
889
|
+
logger_1.logger.warn("Database connection error in getAllConnectionHealthSnapshot, retrying...", {
|
|
890
|
+
operation: 'getAllConnectionHealthSnapshot',
|
|
891
|
+
model: 'ConnectionHealthSnapshot',
|
|
892
|
+
attempt: retryCount,
|
|
893
|
+
maxRetries: MAX_RETRIES,
|
|
894
|
+
});
|
|
682
895
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
683
896
|
continue;
|
|
684
897
|
}
|
|
685
|
-
// Log
|
|
686
|
-
logger_1.logger.error("Database
|
|
898
|
+
// Log structured error details and rethrow
|
|
899
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
900
|
+
operation: 'getAllConnectionHealthSnapshot',
|
|
901
|
+
model: 'ConnectionHealthSnapshot',
|
|
902
|
+
error: String(error),
|
|
903
|
+
isRetryable: isConnectionError,
|
|
904
|
+
});
|
|
687
905
|
throw error;
|
|
688
906
|
}
|
|
689
907
|
}
|
|
@@ -757,12 +975,22 @@ exports.ConnectionHealthSnapshot = {
|
|
|
757
975
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
758
976
|
retryCount++;
|
|
759
977
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
760
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
978
|
+
logger_1.logger.warn("Database connection error in findManyConnectionHealthSnapshot, retrying...", {
|
|
979
|
+
operation: 'findManyConnectionHealthSnapshot',
|
|
980
|
+
model: 'ConnectionHealthSnapshot',
|
|
981
|
+
attempt: retryCount,
|
|
982
|
+
maxRetries: MAX_RETRIES,
|
|
983
|
+
});
|
|
761
984
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
762
985
|
continue;
|
|
763
986
|
}
|
|
764
|
-
// Log
|
|
765
|
-
logger_1.logger.error("Database
|
|
987
|
+
// Log structured error details and rethrow
|
|
988
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
989
|
+
operation: 'findManyConnectionHealthSnapshot',
|
|
990
|
+
model: 'ConnectionHealthSnapshot',
|
|
991
|
+
error: String(error),
|
|
992
|
+
isRetryable: isConnectionError,
|
|
993
|
+
});
|
|
766
994
|
throw error;
|
|
767
995
|
}
|
|
768
996
|
}
|