@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
|
@@ -46,7 +46,7 @@ exports.SignalGeneratorMetrics = {
|
|
|
46
46
|
* @returns The created SignalGeneratorMetrics or null.
|
|
47
47
|
*/
|
|
48
48
|
async create(props, globalClient) {
|
|
49
|
-
var _a, _b, _c, _d, _e;
|
|
49
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
50
50
|
// Maximum number of retries for database connection issues
|
|
51
51
|
const MAX_RETRIES = 3;
|
|
52
52
|
let retryCount = 0;
|
|
@@ -100,21 +100,52 @@ exports.SignalGeneratorMetrics = {
|
|
|
100
100
|
}
|
|
101
101
|
catch (error) {
|
|
102
102
|
lastError = error;
|
|
103
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
104
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
105
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
106
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
107
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
108
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
109
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
110
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
111
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
112
|
+
if (isConstraintViolation) {
|
|
113
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
114
|
+
logger_1.logger.error("Non-retryable constraint violation in createOneSignalGeneratorMetrics", {
|
|
115
|
+
operation: 'createOneSignalGeneratorMetrics',
|
|
116
|
+
model: 'SignalGeneratorMetrics',
|
|
117
|
+
error: String(error),
|
|
118
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
119
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
120
|
+
isRetryable: false,
|
|
121
|
+
});
|
|
122
|
+
throw error;
|
|
123
|
+
}
|
|
103
124
|
// Check if this is a database connection error that we should retry
|
|
104
|
-
const isConnectionError = ((
|
|
105
|
-
((
|
|
106
|
-
((
|
|
107
|
-
((
|
|
108
|
-
(error.networkError && ((
|
|
125
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
126
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
127
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
128
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
129
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
109
130
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
110
131
|
retryCount++;
|
|
111
132
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
112
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
133
|
+
logger_1.logger.warn("Database connection error in createOneSignalGeneratorMetrics, retrying...", {
|
|
134
|
+
operation: 'createOneSignalGeneratorMetrics',
|
|
135
|
+
model: 'SignalGeneratorMetrics',
|
|
136
|
+
attempt: retryCount,
|
|
137
|
+
maxRetries: MAX_RETRIES,
|
|
138
|
+
});
|
|
113
139
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
114
140
|
continue;
|
|
115
141
|
}
|
|
116
|
-
// Log
|
|
117
|
-
logger_1.logger.error("Database
|
|
142
|
+
// Log structured error details and rethrow
|
|
143
|
+
logger_1.logger.error("Database create operation failed", {
|
|
144
|
+
operation: 'createOneSignalGeneratorMetrics',
|
|
145
|
+
model: 'SignalGeneratorMetrics',
|
|
146
|
+
error: String(error),
|
|
147
|
+
isRetryable: isConnectionError,
|
|
148
|
+
});
|
|
118
149
|
throw error;
|
|
119
150
|
}
|
|
120
151
|
}
|
|
@@ -129,7 +160,7 @@ exports.SignalGeneratorMetrics = {
|
|
|
129
160
|
* @returns The count of created records or null.
|
|
130
161
|
*/
|
|
131
162
|
async createMany(props, globalClient) {
|
|
132
|
-
var _a, _b, _c, _d, _e;
|
|
163
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
133
164
|
// Maximum number of retries for database connection issues
|
|
134
165
|
const MAX_RETRIES = 3;
|
|
135
166
|
let retryCount = 0;
|
|
@@ -182,21 +213,52 @@ exports.SignalGeneratorMetrics = {
|
|
|
182
213
|
}
|
|
183
214
|
catch (error) {
|
|
184
215
|
lastError = error;
|
|
216
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
217
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
218
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
219
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
220
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
221
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
222
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
223
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
224
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
225
|
+
if (isConstraintViolation) {
|
|
226
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
227
|
+
logger_1.logger.error("Non-retryable constraint violation in createManySignalGeneratorMetrics", {
|
|
228
|
+
operation: 'createManySignalGeneratorMetrics',
|
|
229
|
+
model: 'SignalGeneratorMetrics',
|
|
230
|
+
error: String(error),
|
|
231
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
232
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
233
|
+
isRetryable: false,
|
|
234
|
+
});
|
|
235
|
+
throw error;
|
|
236
|
+
}
|
|
185
237
|
// Check if this is a database connection error that we should retry
|
|
186
|
-
const isConnectionError = ((
|
|
187
|
-
((
|
|
188
|
-
((
|
|
189
|
-
((
|
|
190
|
-
(error.networkError && ((
|
|
238
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
239
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
240
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
241
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
242
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
191
243
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
192
244
|
retryCount++;
|
|
193
245
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
194
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
246
|
+
logger_1.logger.warn("Database connection error in createManySignalGeneratorMetrics, retrying...", {
|
|
247
|
+
operation: 'createManySignalGeneratorMetrics',
|
|
248
|
+
model: 'SignalGeneratorMetrics',
|
|
249
|
+
attempt: retryCount,
|
|
250
|
+
maxRetries: MAX_RETRIES,
|
|
251
|
+
});
|
|
195
252
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
196
253
|
continue;
|
|
197
254
|
}
|
|
198
|
-
// Log
|
|
199
|
-
logger_1.logger.error("Database
|
|
255
|
+
// Log structured error details and rethrow
|
|
256
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
257
|
+
operation: 'createManySignalGeneratorMetrics',
|
|
258
|
+
model: 'SignalGeneratorMetrics',
|
|
259
|
+
error: String(error),
|
|
260
|
+
isRetryable: isConnectionError,
|
|
261
|
+
});
|
|
200
262
|
throw error;
|
|
201
263
|
}
|
|
202
264
|
}
|
|
@@ -211,7 +273,7 @@ exports.SignalGeneratorMetrics = {
|
|
|
211
273
|
* @returns The updated SignalGeneratorMetrics or null.
|
|
212
274
|
*/
|
|
213
275
|
async update(props, globalClient) {
|
|
214
|
-
var _a, _b, _c, _d, _e;
|
|
276
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
215
277
|
// Maximum number of retries for database connection issues
|
|
216
278
|
const MAX_RETRIES = 3;
|
|
217
279
|
let retryCount = 0;
|
|
@@ -320,21 +382,55 @@ exports.SignalGeneratorMetrics = {
|
|
|
320
382
|
}
|
|
321
383
|
catch (error) {
|
|
322
384
|
lastError = error;
|
|
385
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
386
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
387
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
388
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
389
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
390
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
391
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
392
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
393
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
394
|
+
if (isConstraintViolation) {
|
|
395
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
396
|
+
logger_1.logger.error("Non-retryable constraint violation in updateOneSignalGeneratorMetrics", {
|
|
397
|
+
operation: 'updateOneSignalGeneratorMetrics',
|
|
398
|
+
model: 'SignalGeneratorMetrics',
|
|
399
|
+
error: String(error),
|
|
400
|
+
recordId: props.id,
|
|
401
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
402
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
403
|
+
isRetryable: false,
|
|
404
|
+
});
|
|
405
|
+
throw error;
|
|
406
|
+
}
|
|
323
407
|
// Check if this is a database connection error that we should retry
|
|
324
|
-
const isConnectionError = ((
|
|
325
|
-
((
|
|
326
|
-
((
|
|
327
|
-
((
|
|
328
|
-
(error.networkError && ((
|
|
408
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
409
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
410
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
411
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
412
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
329
413
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
330
414
|
retryCount++;
|
|
331
415
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
332
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
416
|
+
logger_1.logger.warn("Database connection error in updateOneSignalGeneratorMetrics, retrying...", {
|
|
417
|
+
operation: 'updateOneSignalGeneratorMetrics',
|
|
418
|
+
model: 'SignalGeneratorMetrics',
|
|
419
|
+
attempt: retryCount,
|
|
420
|
+
maxRetries: MAX_RETRIES,
|
|
421
|
+
recordId: props.id,
|
|
422
|
+
});
|
|
333
423
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
334
424
|
continue;
|
|
335
425
|
}
|
|
336
|
-
// Log
|
|
337
|
-
logger_1.logger.error("Database
|
|
426
|
+
// Log structured error details and rethrow
|
|
427
|
+
logger_1.logger.error("Database update operation failed", {
|
|
428
|
+
operation: 'updateOneSignalGeneratorMetrics',
|
|
429
|
+
model: 'SignalGeneratorMetrics',
|
|
430
|
+
error: String(error),
|
|
431
|
+
recordId: props.id,
|
|
432
|
+
isRetryable: isConnectionError,
|
|
433
|
+
});
|
|
338
434
|
throw error;
|
|
339
435
|
}
|
|
340
436
|
}
|
|
@@ -349,7 +445,7 @@ exports.SignalGeneratorMetrics = {
|
|
|
349
445
|
* @returns The updated SignalGeneratorMetrics or null.
|
|
350
446
|
*/
|
|
351
447
|
async upsert(props, globalClient) {
|
|
352
|
-
var _a, _b, _c, _d, _e;
|
|
448
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
353
449
|
// Maximum number of retries for database connection issues
|
|
354
450
|
const MAX_RETRIES = 3;
|
|
355
451
|
let retryCount = 0;
|
|
@@ -464,21 +560,55 @@ exports.SignalGeneratorMetrics = {
|
|
|
464
560
|
}
|
|
465
561
|
catch (error) {
|
|
466
562
|
lastError = error;
|
|
563
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
564
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
565
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
566
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
567
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
568
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
569
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
570
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
571
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
572
|
+
if (isConstraintViolation) {
|
|
573
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
574
|
+
logger_1.logger.error("Non-retryable constraint violation in upsertOneSignalGeneratorMetrics", {
|
|
575
|
+
operation: 'upsertOneSignalGeneratorMetrics',
|
|
576
|
+
model: 'SignalGeneratorMetrics',
|
|
577
|
+
error: String(error),
|
|
578
|
+
recordId: props.id,
|
|
579
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
580
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
581
|
+
isRetryable: false,
|
|
582
|
+
});
|
|
583
|
+
throw error;
|
|
584
|
+
}
|
|
467
585
|
// Check if this is a database connection error that we should retry
|
|
468
|
-
const isConnectionError = ((
|
|
469
|
-
((
|
|
470
|
-
((
|
|
471
|
-
((
|
|
472
|
-
(error.networkError && ((
|
|
586
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
587
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
588
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
589
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
590
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
473
591
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
474
592
|
retryCount++;
|
|
475
593
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
476
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
594
|
+
logger_1.logger.warn("Database connection error in upsertOneSignalGeneratorMetrics, retrying...", {
|
|
595
|
+
operation: 'upsertOneSignalGeneratorMetrics',
|
|
596
|
+
model: 'SignalGeneratorMetrics',
|
|
597
|
+
attempt: retryCount,
|
|
598
|
+
maxRetries: MAX_RETRIES,
|
|
599
|
+
recordId: props.id,
|
|
600
|
+
});
|
|
477
601
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
478
602
|
continue;
|
|
479
603
|
}
|
|
480
|
-
// Log
|
|
481
|
-
logger_1.logger.error("Database
|
|
604
|
+
// Log structured error details and rethrow
|
|
605
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
606
|
+
operation: 'upsertOneSignalGeneratorMetrics',
|
|
607
|
+
model: 'SignalGeneratorMetrics',
|
|
608
|
+
error: String(error),
|
|
609
|
+
recordId: props.id,
|
|
610
|
+
isRetryable: isConnectionError,
|
|
611
|
+
});
|
|
482
612
|
throw error;
|
|
483
613
|
}
|
|
484
614
|
}
|
|
@@ -493,7 +623,7 @@ exports.SignalGeneratorMetrics = {
|
|
|
493
623
|
* @returns The count of created records or null.
|
|
494
624
|
*/
|
|
495
625
|
async updateMany(props, globalClient) {
|
|
496
|
-
var _a, _b, _c, _d, _e;
|
|
626
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
497
627
|
// Maximum number of retries for database connection issues
|
|
498
628
|
const MAX_RETRIES = 3;
|
|
499
629
|
let retryCount = 0;
|
|
@@ -602,21 +732,52 @@ exports.SignalGeneratorMetrics = {
|
|
|
602
732
|
}
|
|
603
733
|
catch (error) {
|
|
604
734
|
lastError = error;
|
|
735
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
736
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
737
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
738
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
739
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
740
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
741
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
742
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
743
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
744
|
+
if (isConstraintViolation) {
|
|
745
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
746
|
+
logger_1.logger.error("Non-retryable constraint violation in updateManySignalGeneratorMetrics", {
|
|
747
|
+
operation: 'updateManySignalGeneratorMetrics',
|
|
748
|
+
model: 'SignalGeneratorMetrics',
|
|
749
|
+
error: String(error),
|
|
750
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
751
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
752
|
+
isRetryable: false,
|
|
753
|
+
});
|
|
754
|
+
throw error;
|
|
755
|
+
}
|
|
605
756
|
// Check if this is a database connection error that we should retry
|
|
606
|
-
const isConnectionError = ((
|
|
607
|
-
((
|
|
608
|
-
((
|
|
609
|
-
((
|
|
610
|
-
(error.networkError && ((
|
|
757
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
758
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
759
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
760
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
761
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
611
762
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
612
763
|
retryCount++;
|
|
613
764
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
614
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
765
|
+
logger_1.logger.warn("Database connection error in updateManySignalGeneratorMetrics, retrying...", {
|
|
766
|
+
operation: 'updateManySignalGeneratorMetrics',
|
|
767
|
+
model: 'SignalGeneratorMetrics',
|
|
768
|
+
attempt: retryCount,
|
|
769
|
+
maxRetries: MAX_RETRIES,
|
|
770
|
+
});
|
|
615
771
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
616
772
|
continue;
|
|
617
773
|
}
|
|
618
|
-
// Log
|
|
619
|
-
logger_1.logger.error("Database
|
|
774
|
+
// Log structured error details and rethrow
|
|
775
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
776
|
+
operation: 'updateManySignalGeneratorMetrics',
|
|
777
|
+
model: 'SignalGeneratorMetrics',
|
|
778
|
+
error: String(error),
|
|
779
|
+
isRetryable: isConnectionError,
|
|
780
|
+
});
|
|
620
781
|
throw error;
|
|
621
782
|
}
|
|
622
783
|
}
|
|
@@ -631,7 +792,7 @@ exports.SignalGeneratorMetrics = {
|
|
|
631
792
|
* @returns The deleted SignalGeneratorMetrics or null.
|
|
632
793
|
*/
|
|
633
794
|
async delete(props, globalClient) {
|
|
634
|
-
var _a, _b, _c, _d, _e;
|
|
795
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
635
796
|
// Maximum number of retries for database connection issues
|
|
636
797
|
const MAX_RETRIES = 3;
|
|
637
798
|
let retryCount = 0;
|
|
@@ -675,21 +836,58 @@ exports.SignalGeneratorMetrics = {
|
|
|
675
836
|
}
|
|
676
837
|
catch (error) {
|
|
677
838
|
lastError = error;
|
|
839
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
840
|
+
// (e.g., foreign key constraints preventing deletion)
|
|
841
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
842
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
843
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
844
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
845
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
846
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
847
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('23503')) ||
|
|
848
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2002')) ||
|
|
849
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('P2003')) ||
|
|
850
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('P2014'));
|
|
851
|
+
if (isConstraintViolation) {
|
|
852
|
+
const constraintMatch = (_l = error.message) === null || _l === void 0 ? void 0 : _l.match(/constraint\s+"([^"]+)"/);
|
|
853
|
+
logger_1.logger.error("Non-retryable constraint violation in deleteOneSignalGeneratorMetrics", {
|
|
854
|
+
operation: 'deleteOneSignalGeneratorMetrics',
|
|
855
|
+
model: 'SignalGeneratorMetrics',
|
|
856
|
+
error: String(error),
|
|
857
|
+
recordId: props.id,
|
|
858
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
859
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
860
|
+
isRetryable: false,
|
|
861
|
+
});
|
|
862
|
+
throw error;
|
|
863
|
+
}
|
|
678
864
|
// Check if this is a database connection error that we should retry
|
|
679
|
-
const isConnectionError = ((
|
|
680
|
-
((
|
|
681
|
-
((
|
|
682
|
-
((
|
|
683
|
-
(error.networkError && ((
|
|
865
|
+
const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
|
|
866
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
|
|
867
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
|
|
868
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
869
|
+
(error.networkError && ((_r = error.networkError.message) === null || _r === void 0 ? void 0 : _r.includes('Failed to fetch')));
|
|
684
870
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
685
871
|
retryCount++;
|
|
686
872
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
687
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
873
|
+
logger_1.logger.warn("Database connection error in deleteOneSignalGeneratorMetrics, retrying...", {
|
|
874
|
+
operation: 'deleteOneSignalGeneratorMetrics',
|
|
875
|
+
model: 'SignalGeneratorMetrics',
|
|
876
|
+
attempt: retryCount,
|
|
877
|
+
maxRetries: MAX_RETRIES,
|
|
878
|
+
recordId: props.id,
|
|
879
|
+
});
|
|
688
880
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
689
881
|
continue;
|
|
690
882
|
}
|
|
691
|
-
// Log
|
|
692
|
-
logger_1.logger.error("Database
|
|
883
|
+
// Log structured error details and rethrow
|
|
884
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
885
|
+
operation: 'deleteOneSignalGeneratorMetrics',
|
|
886
|
+
model: 'SignalGeneratorMetrics',
|
|
887
|
+
error: String(error),
|
|
888
|
+
recordId: props.id,
|
|
889
|
+
isRetryable: isConnectionError,
|
|
890
|
+
});
|
|
693
891
|
throw error;
|
|
694
892
|
}
|
|
695
893
|
}
|
|
@@ -759,12 +957,22 @@ exports.SignalGeneratorMetrics = {
|
|
|
759
957
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
760
958
|
retryCount++;
|
|
761
959
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
762
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
960
|
+
logger_1.logger.warn("Database connection error in getSignalGeneratorMetrics, retrying...", {
|
|
961
|
+
operation: 'getSignalGeneratorMetrics',
|
|
962
|
+
model: 'SignalGeneratorMetrics',
|
|
963
|
+
attempt: retryCount,
|
|
964
|
+
maxRetries: MAX_RETRIES,
|
|
965
|
+
});
|
|
763
966
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
764
967
|
continue;
|
|
765
968
|
}
|
|
766
|
-
// Log
|
|
767
|
-
logger_1.logger.error("Database
|
|
969
|
+
// Log structured error details and rethrow
|
|
970
|
+
logger_1.logger.error("Database get operation failed", {
|
|
971
|
+
operation: 'getSignalGeneratorMetrics',
|
|
972
|
+
model: 'SignalGeneratorMetrics',
|
|
973
|
+
error: String(error),
|
|
974
|
+
isRetryable: isConnectionError,
|
|
975
|
+
});
|
|
768
976
|
throw error;
|
|
769
977
|
}
|
|
770
978
|
}
|
|
@@ -822,12 +1030,22 @@ exports.SignalGeneratorMetrics = {
|
|
|
822
1030
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
823
1031
|
retryCount++;
|
|
824
1032
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
825
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
1033
|
+
logger_1.logger.warn("Database connection error in getAllSignalGeneratorMetrics, retrying...", {
|
|
1034
|
+
operation: 'getAllSignalGeneratorMetrics',
|
|
1035
|
+
model: 'SignalGeneratorMetrics',
|
|
1036
|
+
attempt: retryCount,
|
|
1037
|
+
maxRetries: MAX_RETRIES,
|
|
1038
|
+
});
|
|
826
1039
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
827
1040
|
continue;
|
|
828
1041
|
}
|
|
829
|
-
// Log
|
|
830
|
-
logger_1.logger.error("Database
|
|
1042
|
+
// Log structured error details and rethrow
|
|
1043
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1044
|
+
operation: 'getAllSignalGeneratorMetrics',
|
|
1045
|
+
model: 'SignalGeneratorMetrics',
|
|
1046
|
+
error: String(error),
|
|
1047
|
+
isRetryable: isConnectionError,
|
|
1048
|
+
});
|
|
831
1049
|
throw error;
|
|
832
1050
|
}
|
|
833
1051
|
}
|
|
@@ -904,12 +1122,22 @@ exports.SignalGeneratorMetrics = {
|
|
|
904
1122
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
905
1123
|
retryCount++;
|
|
906
1124
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
907
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
1125
|
+
logger_1.logger.warn("Database connection error in findManySignalGeneratorMetrics, retrying...", {
|
|
1126
|
+
operation: 'findManySignalGeneratorMetrics',
|
|
1127
|
+
model: 'SignalGeneratorMetrics',
|
|
1128
|
+
attempt: retryCount,
|
|
1129
|
+
maxRetries: MAX_RETRIES,
|
|
1130
|
+
});
|
|
908
1131
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
909
1132
|
continue;
|
|
910
1133
|
}
|
|
911
|
-
// Log
|
|
912
|
-
logger_1.logger.error("Database
|
|
1134
|
+
// Log structured error details and rethrow
|
|
1135
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1136
|
+
operation: 'findManySignalGeneratorMetrics',
|
|
1137
|
+
model: 'SignalGeneratorMetrics',
|
|
1138
|
+
error: String(error),
|
|
1139
|
+
isRetryable: isConnectionError,
|
|
1140
|
+
});
|
|
913
1141
|
throw error;
|
|
914
1142
|
}
|
|
915
1143
|
}
|