@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
package/AnalyticsSnapshot.cjs
CHANGED
|
@@ -33,7 +33,7 @@ exports.AnalyticsSnapshot = {
|
|
|
33
33
|
* @returns The created AnalyticsSnapshot or null.
|
|
34
34
|
*/
|
|
35
35
|
async create(props, globalClient) {
|
|
36
|
-
var _a, _b, _c, _d, _e;
|
|
36
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
37
37
|
// Maximum number of retries for database connection issues
|
|
38
38
|
const MAX_RETRIES = 3;
|
|
39
39
|
let retryCount = 0;
|
|
@@ -81,21 +81,52 @@ exports.AnalyticsSnapshot = {
|
|
|
81
81
|
}
|
|
82
82
|
catch (error) {
|
|
83
83
|
lastError = error;
|
|
84
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
85
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
86
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
87
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
88
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
89
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
90
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
91
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
92
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
93
|
+
if (isConstraintViolation) {
|
|
94
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
95
|
+
logger_1.logger.error("Non-retryable constraint violation in createOneAnalyticsSnapshot", {
|
|
96
|
+
operation: 'createOneAnalyticsSnapshot',
|
|
97
|
+
model: 'AnalyticsSnapshot',
|
|
98
|
+
error: String(error),
|
|
99
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
100
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
101
|
+
isRetryable: false,
|
|
102
|
+
});
|
|
103
|
+
throw error;
|
|
104
|
+
}
|
|
84
105
|
// Check if this is a database connection error that we should retry
|
|
85
|
-
const isConnectionError = ((
|
|
86
|
-
((
|
|
87
|
-
((
|
|
88
|
-
((
|
|
89
|
-
(error.networkError && ((
|
|
106
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
107
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
108
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
109
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
110
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
90
111
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
91
112
|
retryCount++;
|
|
92
113
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
93
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
114
|
+
logger_1.logger.warn("Database connection error in createOneAnalyticsSnapshot, retrying...", {
|
|
115
|
+
operation: 'createOneAnalyticsSnapshot',
|
|
116
|
+
model: 'AnalyticsSnapshot',
|
|
117
|
+
attempt: retryCount,
|
|
118
|
+
maxRetries: MAX_RETRIES,
|
|
119
|
+
});
|
|
94
120
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
95
121
|
continue;
|
|
96
122
|
}
|
|
97
|
-
// Log
|
|
98
|
-
logger_1.logger.error("Database
|
|
123
|
+
// Log structured error details and rethrow
|
|
124
|
+
logger_1.logger.error("Database create operation failed", {
|
|
125
|
+
operation: 'createOneAnalyticsSnapshot',
|
|
126
|
+
model: 'AnalyticsSnapshot',
|
|
127
|
+
error: String(error),
|
|
128
|
+
isRetryable: isConnectionError,
|
|
129
|
+
});
|
|
99
130
|
throw error;
|
|
100
131
|
}
|
|
101
132
|
}
|
|
@@ -110,7 +141,7 @@ exports.AnalyticsSnapshot = {
|
|
|
110
141
|
* @returns The count of created records or null.
|
|
111
142
|
*/
|
|
112
143
|
async createMany(props, globalClient) {
|
|
113
|
-
var _a, _b, _c, _d, _e;
|
|
144
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
114
145
|
// Maximum number of retries for database connection issues
|
|
115
146
|
const MAX_RETRIES = 3;
|
|
116
147
|
let retryCount = 0;
|
|
@@ -157,21 +188,52 @@ exports.AnalyticsSnapshot = {
|
|
|
157
188
|
}
|
|
158
189
|
catch (error) {
|
|
159
190
|
lastError = error;
|
|
191
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
192
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
193
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
194
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
195
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
196
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
197
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
198
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
199
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
200
|
+
if (isConstraintViolation) {
|
|
201
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
202
|
+
logger_1.logger.error("Non-retryable constraint violation in createManyAnalyticsSnapshot", {
|
|
203
|
+
operation: 'createManyAnalyticsSnapshot',
|
|
204
|
+
model: 'AnalyticsSnapshot',
|
|
205
|
+
error: String(error),
|
|
206
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
207
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
208
|
+
isRetryable: false,
|
|
209
|
+
});
|
|
210
|
+
throw error;
|
|
211
|
+
}
|
|
160
212
|
// Check if this is a database connection error that we should retry
|
|
161
|
-
const isConnectionError = ((
|
|
162
|
-
((
|
|
163
|
-
((
|
|
164
|
-
((
|
|
165
|
-
(error.networkError && ((
|
|
213
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
214
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
215
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
216
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
217
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
166
218
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
167
219
|
retryCount++;
|
|
168
220
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
169
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
221
|
+
logger_1.logger.warn("Database connection error in createManyAnalyticsSnapshot, retrying...", {
|
|
222
|
+
operation: 'createManyAnalyticsSnapshot',
|
|
223
|
+
model: 'AnalyticsSnapshot',
|
|
224
|
+
attempt: retryCount,
|
|
225
|
+
maxRetries: MAX_RETRIES,
|
|
226
|
+
});
|
|
170
227
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
171
228
|
continue;
|
|
172
229
|
}
|
|
173
|
-
// Log
|
|
174
|
-
logger_1.logger.error("Database
|
|
230
|
+
// Log structured error details and rethrow
|
|
231
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
232
|
+
operation: 'createManyAnalyticsSnapshot',
|
|
233
|
+
model: 'AnalyticsSnapshot',
|
|
234
|
+
error: String(error),
|
|
235
|
+
isRetryable: isConnectionError,
|
|
236
|
+
});
|
|
175
237
|
throw error;
|
|
176
238
|
}
|
|
177
239
|
}
|
|
@@ -186,7 +248,7 @@ exports.AnalyticsSnapshot = {
|
|
|
186
248
|
* @returns The updated AnalyticsSnapshot or null.
|
|
187
249
|
*/
|
|
188
250
|
async update(props, globalClient) {
|
|
189
|
-
var _a, _b, _c, _d, _e;
|
|
251
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
190
252
|
// Maximum number of retries for database connection issues
|
|
191
253
|
const MAX_RETRIES = 3;
|
|
192
254
|
let retryCount = 0;
|
|
@@ -256,21 +318,55 @@ exports.AnalyticsSnapshot = {
|
|
|
256
318
|
}
|
|
257
319
|
catch (error) {
|
|
258
320
|
lastError = error;
|
|
321
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
322
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
323
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
324
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
325
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
326
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
327
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
328
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
329
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
330
|
+
if (isConstraintViolation) {
|
|
331
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
332
|
+
logger_1.logger.error("Non-retryable constraint violation in updateOneAnalyticsSnapshot", {
|
|
333
|
+
operation: 'updateOneAnalyticsSnapshot',
|
|
334
|
+
model: 'AnalyticsSnapshot',
|
|
335
|
+
error: String(error),
|
|
336
|
+
recordId: props.id,
|
|
337
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
338
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
339
|
+
isRetryable: false,
|
|
340
|
+
});
|
|
341
|
+
throw error;
|
|
342
|
+
}
|
|
259
343
|
// Check if this is a database connection error that we should retry
|
|
260
|
-
const isConnectionError = ((
|
|
261
|
-
((
|
|
262
|
-
((
|
|
263
|
-
((
|
|
264
|
-
(error.networkError && ((
|
|
344
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
345
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
346
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
347
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
348
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
265
349
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
266
350
|
retryCount++;
|
|
267
351
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
268
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
352
|
+
logger_1.logger.warn("Database connection error in updateOneAnalyticsSnapshot, retrying...", {
|
|
353
|
+
operation: 'updateOneAnalyticsSnapshot',
|
|
354
|
+
model: 'AnalyticsSnapshot',
|
|
355
|
+
attempt: retryCount,
|
|
356
|
+
maxRetries: MAX_RETRIES,
|
|
357
|
+
recordId: props.id,
|
|
358
|
+
});
|
|
269
359
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
270
360
|
continue;
|
|
271
361
|
}
|
|
272
|
-
// Log
|
|
273
|
-
logger_1.logger.error("Database
|
|
362
|
+
// Log structured error details and rethrow
|
|
363
|
+
logger_1.logger.error("Database update operation failed", {
|
|
364
|
+
operation: 'updateOneAnalyticsSnapshot',
|
|
365
|
+
model: 'AnalyticsSnapshot',
|
|
366
|
+
error: String(error),
|
|
367
|
+
recordId: props.id,
|
|
368
|
+
isRetryable: isConnectionError,
|
|
369
|
+
});
|
|
274
370
|
throw error;
|
|
275
371
|
}
|
|
276
372
|
}
|
|
@@ -285,7 +381,7 @@ exports.AnalyticsSnapshot = {
|
|
|
285
381
|
* @returns The updated AnalyticsSnapshot or null.
|
|
286
382
|
*/
|
|
287
383
|
async upsert(props, globalClient) {
|
|
288
|
-
var _a, _b, _c, _d, _e;
|
|
384
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
289
385
|
// Maximum number of retries for database connection issues
|
|
290
386
|
const MAX_RETRIES = 3;
|
|
291
387
|
let retryCount = 0;
|
|
@@ -352,21 +448,55 @@ exports.AnalyticsSnapshot = {
|
|
|
352
448
|
}
|
|
353
449
|
catch (error) {
|
|
354
450
|
lastError = error;
|
|
451
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
452
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
453
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
454
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
455
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
456
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
457
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
458
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
459
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
460
|
+
if (isConstraintViolation) {
|
|
461
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
462
|
+
logger_1.logger.error("Non-retryable constraint violation in upsertOneAnalyticsSnapshot", {
|
|
463
|
+
operation: 'upsertOneAnalyticsSnapshot',
|
|
464
|
+
model: 'AnalyticsSnapshot',
|
|
465
|
+
error: String(error),
|
|
466
|
+
recordId: props.id,
|
|
467
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
468
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
469
|
+
isRetryable: false,
|
|
470
|
+
});
|
|
471
|
+
throw error;
|
|
472
|
+
}
|
|
355
473
|
// Check if this is a database connection error that we should retry
|
|
356
|
-
const isConnectionError = ((
|
|
357
|
-
((
|
|
358
|
-
((
|
|
359
|
-
((
|
|
360
|
-
(error.networkError && ((
|
|
474
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
475
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
476
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
477
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
478
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
361
479
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
362
480
|
retryCount++;
|
|
363
481
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
364
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
482
|
+
logger_1.logger.warn("Database connection error in upsertOneAnalyticsSnapshot, retrying...", {
|
|
483
|
+
operation: 'upsertOneAnalyticsSnapshot',
|
|
484
|
+
model: 'AnalyticsSnapshot',
|
|
485
|
+
attempt: retryCount,
|
|
486
|
+
maxRetries: MAX_RETRIES,
|
|
487
|
+
recordId: props.id,
|
|
488
|
+
});
|
|
365
489
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
366
490
|
continue;
|
|
367
491
|
}
|
|
368
|
-
// Log
|
|
369
|
-
logger_1.logger.error("Database
|
|
492
|
+
// Log structured error details and rethrow
|
|
493
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
494
|
+
operation: 'upsertOneAnalyticsSnapshot',
|
|
495
|
+
model: 'AnalyticsSnapshot',
|
|
496
|
+
error: String(error),
|
|
497
|
+
recordId: props.id,
|
|
498
|
+
isRetryable: isConnectionError,
|
|
499
|
+
});
|
|
370
500
|
throw error;
|
|
371
501
|
}
|
|
372
502
|
}
|
|
@@ -381,7 +511,7 @@ exports.AnalyticsSnapshot = {
|
|
|
381
511
|
* @returns The count of created records or null.
|
|
382
512
|
*/
|
|
383
513
|
async updateMany(props, globalClient) {
|
|
384
|
-
var _a, _b, _c, _d, _e;
|
|
514
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
385
515
|
// Maximum number of retries for database connection issues
|
|
386
516
|
const MAX_RETRIES = 3;
|
|
387
517
|
let retryCount = 0;
|
|
@@ -451,21 +581,52 @@ exports.AnalyticsSnapshot = {
|
|
|
451
581
|
}
|
|
452
582
|
catch (error) {
|
|
453
583
|
lastError = error;
|
|
584
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
585
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
586
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
587
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
588
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
589
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
590
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
591
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
592
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
593
|
+
if (isConstraintViolation) {
|
|
594
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
595
|
+
logger_1.logger.error("Non-retryable constraint violation in updateManyAnalyticsSnapshot", {
|
|
596
|
+
operation: 'updateManyAnalyticsSnapshot',
|
|
597
|
+
model: 'AnalyticsSnapshot',
|
|
598
|
+
error: String(error),
|
|
599
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
600
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
601
|
+
isRetryable: false,
|
|
602
|
+
});
|
|
603
|
+
throw error;
|
|
604
|
+
}
|
|
454
605
|
// Check if this is a database connection error that we should retry
|
|
455
|
-
const isConnectionError = ((
|
|
456
|
-
((
|
|
457
|
-
((
|
|
458
|
-
((
|
|
459
|
-
(error.networkError && ((
|
|
606
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
607
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
608
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
609
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
610
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
460
611
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
461
612
|
retryCount++;
|
|
462
613
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
463
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
614
|
+
logger_1.logger.warn("Database connection error in updateManyAnalyticsSnapshot, retrying...", {
|
|
615
|
+
operation: 'updateManyAnalyticsSnapshot',
|
|
616
|
+
model: 'AnalyticsSnapshot',
|
|
617
|
+
attempt: retryCount,
|
|
618
|
+
maxRetries: MAX_RETRIES,
|
|
619
|
+
});
|
|
464
620
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
465
621
|
continue;
|
|
466
622
|
}
|
|
467
|
-
// Log
|
|
468
|
-
logger_1.logger.error("Database
|
|
623
|
+
// Log structured error details and rethrow
|
|
624
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
625
|
+
operation: 'updateManyAnalyticsSnapshot',
|
|
626
|
+
model: 'AnalyticsSnapshot',
|
|
627
|
+
error: String(error),
|
|
628
|
+
isRetryable: isConnectionError,
|
|
629
|
+
});
|
|
469
630
|
throw error;
|
|
470
631
|
}
|
|
471
632
|
}
|
|
@@ -480,7 +641,7 @@ exports.AnalyticsSnapshot = {
|
|
|
480
641
|
* @returns The deleted AnalyticsSnapshot or null.
|
|
481
642
|
*/
|
|
482
643
|
async delete(props, globalClient) {
|
|
483
|
-
var _a, _b, _c, _d, _e;
|
|
644
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
484
645
|
// Maximum number of retries for database connection issues
|
|
485
646
|
const MAX_RETRIES = 3;
|
|
486
647
|
let retryCount = 0;
|
|
@@ -524,21 +685,58 @@ exports.AnalyticsSnapshot = {
|
|
|
524
685
|
}
|
|
525
686
|
catch (error) {
|
|
526
687
|
lastError = error;
|
|
688
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
689
|
+
// (e.g., foreign key constraints preventing deletion)
|
|
690
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
691
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
692
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
693
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
694
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
695
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
696
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('23503')) ||
|
|
697
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2002')) ||
|
|
698
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('P2003')) ||
|
|
699
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('P2014'));
|
|
700
|
+
if (isConstraintViolation) {
|
|
701
|
+
const constraintMatch = (_l = error.message) === null || _l === void 0 ? void 0 : _l.match(/constraint\s+"([^"]+)"/);
|
|
702
|
+
logger_1.logger.error("Non-retryable constraint violation in deleteOneAnalyticsSnapshot", {
|
|
703
|
+
operation: 'deleteOneAnalyticsSnapshot',
|
|
704
|
+
model: 'AnalyticsSnapshot',
|
|
705
|
+
error: String(error),
|
|
706
|
+
recordId: props.id,
|
|
707
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
708
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
709
|
+
isRetryable: false,
|
|
710
|
+
});
|
|
711
|
+
throw error;
|
|
712
|
+
}
|
|
527
713
|
// Check if this is a database connection error that we should retry
|
|
528
|
-
const isConnectionError = ((
|
|
529
|
-
((
|
|
530
|
-
((
|
|
531
|
-
((
|
|
532
|
-
(error.networkError && ((
|
|
714
|
+
const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
|
|
715
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
|
|
716
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
|
|
717
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
718
|
+
(error.networkError && ((_r = error.networkError.message) === null || _r === void 0 ? void 0 : _r.includes('Failed to fetch')));
|
|
533
719
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
534
720
|
retryCount++;
|
|
535
721
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
536
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
722
|
+
logger_1.logger.warn("Database connection error in deleteOneAnalyticsSnapshot, retrying...", {
|
|
723
|
+
operation: 'deleteOneAnalyticsSnapshot',
|
|
724
|
+
model: 'AnalyticsSnapshot',
|
|
725
|
+
attempt: retryCount,
|
|
726
|
+
maxRetries: MAX_RETRIES,
|
|
727
|
+
recordId: props.id,
|
|
728
|
+
});
|
|
537
729
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
538
730
|
continue;
|
|
539
731
|
}
|
|
540
|
-
// Log
|
|
541
|
-
logger_1.logger.error("Database
|
|
732
|
+
// Log structured error details and rethrow
|
|
733
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
734
|
+
operation: 'deleteOneAnalyticsSnapshot',
|
|
735
|
+
model: 'AnalyticsSnapshot',
|
|
736
|
+
error: String(error),
|
|
737
|
+
recordId: props.id,
|
|
738
|
+
isRetryable: isConnectionError,
|
|
739
|
+
});
|
|
542
740
|
throw error;
|
|
543
741
|
}
|
|
544
742
|
}
|
|
@@ -608,12 +806,22 @@ exports.AnalyticsSnapshot = {
|
|
|
608
806
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
609
807
|
retryCount++;
|
|
610
808
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
611
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
809
|
+
logger_1.logger.warn("Database connection error in getAnalyticsSnapshot, retrying...", {
|
|
810
|
+
operation: 'getAnalyticsSnapshot',
|
|
811
|
+
model: 'AnalyticsSnapshot',
|
|
812
|
+
attempt: retryCount,
|
|
813
|
+
maxRetries: MAX_RETRIES,
|
|
814
|
+
});
|
|
612
815
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
613
816
|
continue;
|
|
614
817
|
}
|
|
615
|
-
// Log
|
|
616
|
-
logger_1.logger.error("Database
|
|
818
|
+
// Log structured error details and rethrow
|
|
819
|
+
logger_1.logger.error("Database get operation failed", {
|
|
820
|
+
operation: 'getAnalyticsSnapshot',
|
|
821
|
+
model: 'AnalyticsSnapshot',
|
|
822
|
+
error: String(error),
|
|
823
|
+
isRetryable: isConnectionError,
|
|
824
|
+
});
|
|
617
825
|
throw error;
|
|
618
826
|
}
|
|
619
827
|
}
|
|
@@ -671,12 +879,22 @@ exports.AnalyticsSnapshot = {
|
|
|
671
879
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
672
880
|
retryCount++;
|
|
673
881
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
674
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
882
|
+
logger_1.logger.warn("Database connection error in getAllAnalyticsSnapshot, retrying...", {
|
|
883
|
+
operation: 'getAllAnalyticsSnapshot',
|
|
884
|
+
model: 'AnalyticsSnapshot',
|
|
885
|
+
attempt: retryCount,
|
|
886
|
+
maxRetries: MAX_RETRIES,
|
|
887
|
+
});
|
|
675
888
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
676
889
|
continue;
|
|
677
890
|
}
|
|
678
|
-
// Log
|
|
679
|
-
logger_1.logger.error("Database
|
|
891
|
+
// Log structured error details and rethrow
|
|
892
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
893
|
+
operation: 'getAllAnalyticsSnapshot',
|
|
894
|
+
model: 'AnalyticsSnapshot',
|
|
895
|
+
error: String(error),
|
|
896
|
+
isRetryable: isConnectionError,
|
|
897
|
+
});
|
|
680
898
|
throw error;
|
|
681
899
|
}
|
|
682
900
|
}
|
|
@@ -753,12 +971,22 @@ exports.AnalyticsSnapshot = {
|
|
|
753
971
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
754
972
|
retryCount++;
|
|
755
973
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
756
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
974
|
+
logger_1.logger.warn("Database connection error in findManyAnalyticsSnapshot, retrying...", {
|
|
975
|
+
operation: 'findManyAnalyticsSnapshot',
|
|
976
|
+
model: 'AnalyticsSnapshot',
|
|
977
|
+
attempt: retryCount,
|
|
978
|
+
maxRetries: MAX_RETRIES,
|
|
979
|
+
});
|
|
757
980
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
758
981
|
continue;
|
|
759
982
|
}
|
|
760
|
-
// Log
|
|
761
|
-
logger_1.logger.error("Database
|
|
983
|
+
// Log structured error details and rethrow
|
|
984
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
985
|
+
operation: 'findManyAnalyticsSnapshot',
|
|
986
|
+
model: 'AnalyticsSnapshot',
|
|
987
|
+
error: String(error),
|
|
988
|
+
isRetryable: isConnectionError,
|
|
989
|
+
});
|
|
762
990
|
throw error;
|
|
763
991
|
}
|
|
764
992
|
}
|