@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/OptionsContract.cjs
CHANGED
|
@@ -212,7 +212,7 @@ exports.OptionsContract = {
|
|
|
212
212
|
* @returns The created OptionsContract or null.
|
|
213
213
|
*/
|
|
214
214
|
async create(props, globalClient) {
|
|
215
|
-
var _a, _b, _c, _d, _e;
|
|
215
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
216
216
|
// Maximum number of retries for database connection issues
|
|
217
217
|
const MAX_RETRIES = 3;
|
|
218
218
|
let retryCount = 0;
|
|
@@ -482,21 +482,52 @@ exports.OptionsContract = {
|
|
|
482
482
|
}
|
|
483
483
|
catch (error) {
|
|
484
484
|
lastError = error;
|
|
485
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
486
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
487
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
488
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
489
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
490
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
491
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
492
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
493
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
494
|
+
if (isConstraintViolation) {
|
|
495
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
496
|
+
logger_1.logger.error("Non-retryable constraint violation in createOneOptionsContract", {
|
|
497
|
+
operation: 'createOneOptionsContract',
|
|
498
|
+
model: 'OptionsContract',
|
|
499
|
+
error: String(error),
|
|
500
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
501
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
502
|
+
isRetryable: false,
|
|
503
|
+
});
|
|
504
|
+
throw error;
|
|
505
|
+
}
|
|
485
506
|
// Check if this is a database connection error that we should retry
|
|
486
|
-
const isConnectionError = ((
|
|
487
|
-
((
|
|
488
|
-
((
|
|
489
|
-
((
|
|
490
|
-
(error.networkError && ((
|
|
507
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
508
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
509
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
510
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
511
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
491
512
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
492
513
|
retryCount++;
|
|
493
514
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
494
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
515
|
+
logger_1.logger.warn("Database connection error in createOneOptionsContract, retrying...", {
|
|
516
|
+
operation: 'createOneOptionsContract',
|
|
517
|
+
model: 'OptionsContract',
|
|
518
|
+
attempt: retryCount,
|
|
519
|
+
maxRetries: MAX_RETRIES,
|
|
520
|
+
});
|
|
495
521
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
496
522
|
continue;
|
|
497
523
|
}
|
|
498
|
-
// Log
|
|
499
|
-
logger_1.logger.error("Database
|
|
524
|
+
// Log structured error details and rethrow
|
|
525
|
+
logger_1.logger.error("Database create operation failed", {
|
|
526
|
+
operation: 'createOneOptionsContract',
|
|
527
|
+
model: 'OptionsContract',
|
|
528
|
+
error: String(error),
|
|
529
|
+
isRetryable: isConnectionError,
|
|
530
|
+
});
|
|
500
531
|
throw error;
|
|
501
532
|
}
|
|
502
533
|
}
|
|
@@ -511,7 +542,7 @@ exports.OptionsContract = {
|
|
|
511
542
|
* @returns The count of created records or null.
|
|
512
543
|
*/
|
|
513
544
|
async createMany(props, globalClient) {
|
|
514
|
-
var _a, _b, _c, _d, _e;
|
|
545
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
515
546
|
// Maximum number of retries for database connection issues
|
|
516
547
|
const MAX_RETRIES = 3;
|
|
517
548
|
let retryCount = 0;
|
|
@@ -566,21 +597,52 @@ exports.OptionsContract = {
|
|
|
566
597
|
}
|
|
567
598
|
catch (error) {
|
|
568
599
|
lastError = error;
|
|
600
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
601
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
602
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
603
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
604
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
605
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
606
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
607
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
608
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
609
|
+
if (isConstraintViolation) {
|
|
610
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
611
|
+
logger_1.logger.error("Non-retryable constraint violation in createManyOptionsContract", {
|
|
612
|
+
operation: 'createManyOptionsContract',
|
|
613
|
+
model: 'OptionsContract',
|
|
614
|
+
error: String(error),
|
|
615
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
616
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
617
|
+
isRetryable: false,
|
|
618
|
+
});
|
|
619
|
+
throw error;
|
|
620
|
+
}
|
|
569
621
|
// Check if this is a database connection error that we should retry
|
|
570
|
-
const isConnectionError = ((
|
|
571
|
-
((
|
|
572
|
-
((
|
|
573
|
-
((
|
|
574
|
-
(error.networkError && ((
|
|
622
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
623
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
624
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
625
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
626
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
575
627
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
576
628
|
retryCount++;
|
|
577
629
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
578
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
630
|
+
logger_1.logger.warn("Database connection error in createManyOptionsContract, retrying...", {
|
|
631
|
+
operation: 'createManyOptionsContract',
|
|
632
|
+
model: 'OptionsContract',
|
|
633
|
+
attempt: retryCount,
|
|
634
|
+
maxRetries: MAX_RETRIES,
|
|
635
|
+
});
|
|
579
636
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
580
637
|
continue;
|
|
581
638
|
}
|
|
582
|
-
// Log
|
|
583
|
-
logger_1.logger.error("Database
|
|
639
|
+
// Log structured error details and rethrow
|
|
640
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
641
|
+
operation: 'createManyOptionsContract',
|
|
642
|
+
model: 'OptionsContract',
|
|
643
|
+
error: String(error),
|
|
644
|
+
isRetryable: isConnectionError,
|
|
645
|
+
});
|
|
584
646
|
throw error;
|
|
585
647
|
}
|
|
586
648
|
}
|
|
@@ -595,7 +657,7 @@ exports.OptionsContract = {
|
|
|
595
657
|
* @returns The updated OptionsContract or null.
|
|
596
658
|
*/
|
|
597
659
|
async update(props, globalClient) {
|
|
598
|
-
var _a, _b, _c, _d, _e;
|
|
660
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
599
661
|
// Maximum number of retries for database connection issues
|
|
600
662
|
const MAX_RETRIES = 3;
|
|
601
663
|
let retryCount = 0;
|
|
@@ -1693,21 +1755,55 @@ exports.OptionsContract = {
|
|
|
1693
1755
|
}
|
|
1694
1756
|
catch (error) {
|
|
1695
1757
|
lastError = error;
|
|
1758
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
1759
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
1760
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
1761
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
1762
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
1763
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
1764
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
1765
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
1766
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
1767
|
+
if (isConstraintViolation) {
|
|
1768
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
1769
|
+
logger_1.logger.error("Non-retryable constraint violation in updateOneOptionsContract", {
|
|
1770
|
+
operation: 'updateOneOptionsContract',
|
|
1771
|
+
model: 'OptionsContract',
|
|
1772
|
+
error: String(error),
|
|
1773
|
+
recordId: props.id,
|
|
1774
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
1775
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
1776
|
+
isRetryable: false,
|
|
1777
|
+
});
|
|
1778
|
+
throw error;
|
|
1779
|
+
}
|
|
1696
1780
|
// Check if this is a database connection error that we should retry
|
|
1697
|
-
const isConnectionError = ((
|
|
1698
|
-
((
|
|
1699
|
-
((
|
|
1700
|
-
((
|
|
1701
|
-
(error.networkError && ((
|
|
1781
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
1782
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
1783
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
1784
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1785
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
1702
1786
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1703
1787
|
retryCount++;
|
|
1704
1788
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
1705
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
1789
|
+
logger_1.logger.warn("Database connection error in updateOneOptionsContract, retrying...", {
|
|
1790
|
+
operation: 'updateOneOptionsContract',
|
|
1791
|
+
model: 'OptionsContract',
|
|
1792
|
+
attempt: retryCount,
|
|
1793
|
+
maxRetries: MAX_RETRIES,
|
|
1794
|
+
recordId: props.id,
|
|
1795
|
+
});
|
|
1706
1796
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1707
1797
|
continue;
|
|
1708
1798
|
}
|
|
1709
|
-
// Log
|
|
1710
|
-
logger_1.logger.error("Database
|
|
1799
|
+
// Log structured error details and rethrow
|
|
1800
|
+
logger_1.logger.error("Database update operation failed", {
|
|
1801
|
+
operation: 'updateOneOptionsContract',
|
|
1802
|
+
model: 'OptionsContract',
|
|
1803
|
+
error: String(error),
|
|
1804
|
+
recordId: props.id,
|
|
1805
|
+
isRetryable: isConnectionError,
|
|
1806
|
+
});
|
|
1711
1807
|
throw error;
|
|
1712
1808
|
}
|
|
1713
1809
|
}
|
|
@@ -1722,7 +1818,7 @@ exports.OptionsContract = {
|
|
|
1722
1818
|
* @returns The updated OptionsContract or null.
|
|
1723
1819
|
*/
|
|
1724
1820
|
async upsert(props, globalClient) {
|
|
1725
|
-
var _a, _b, _c, _d, _e;
|
|
1821
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
1726
1822
|
// Maximum number of retries for database connection issues
|
|
1727
1823
|
const MAX_RETRIES = 3;
|
|
1728
1824
|
let retryCount = 0;
|
|
@@ -3039,21 +3135,55 @@ exports.OptionsContract = {
|
|
|
3039
3135
|
}
|
|
3040
3136
|
catch (error) {
|
|
3041
3137
|
lastError = error;
|
|
3138
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
3139
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
3140
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
3141
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
3142
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
3143
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
3144
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
3145
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
3146
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
3147
|
+
if (isConstraintViolation) {
|
|
3148
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
3149
|
+
logger_1.logger.error("Non-retryable constraint violation in upsertOneOptionsContract", {
|
|
3150
|
+
operation: 'upsertOneOptionsContract',
|
|
3151
|
+
model: 'OptionsContract',
|
|
3152
|
+
error: String(error),
|
|
3153
|
+
recordId: props.id,
|
|
3154
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
3155
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
3156
|
+
isRetryable: false,
|
|
3157
|
+
});
|
|
3158
|
+
throw error;
|
|
3159
|
+
}
|
|
3042
3160
|
// Check if this is a database connection error that we should retry
|
|
3043
|
-
const isConnectionError = ((
|
|
3044
|
-
((
|
|
3045
|
-
((
|
|
3046
|
-
((
|
|
3047
|
-
(error.networkError && ((
|
|
3161
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
3162
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
3163
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
3164
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
3165
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
3048
3166
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
3049
3167
|
retryCount++;
|
|
3050
3168
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
3051
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
3169
|
+
logger_1.logger.warn("Database connection error in upsertOneOptionsContract, retrying...", {
|
|
3170
|
+
operation: 'upsertOneOptionsContract',
|
|
3171
|
+
model: 'OptionsContract',
|
|
3172
|
+
attempt: retryCount,
|
|
3173
|
+
maxRetries: MAX_RETRIES,
|
|
3174
|
+
recordId: props.id,
|
|
3175
|
+
});
|
|
3052
3176
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
3053
3177
|
continue;
|
|
3054
3178
|
}
|
|
3055
|
-
// Log
|
|
3056
|
-
logger_1.logger.error("Database
|
|
3179
|
+
// Log structured error details and rethrow
|
|
3180
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
3181
|
+
operation: 'upsertOneOptionsContract',
|
|
3182
|
+
model: 'OptionsContract',
|
|
3183
|
+
error: String(error),
|
|
3184
|
+
recordId: props.id,
|
|
3185
|
+
isRetryable: isConnectionError,
|
|
3186
|
+
});
|
|
3057
3187
|
throw error;
|
|
3058
3188
|
}
|
|
3059
3189
|
}
|
|
@@ -3068,7 +3198,7 @@ exports.OptionsContract = {
|
|
|
3068
3198
|
* @returns The count of created records or null.
|
|
3069
3199
|
*/
|
|
3070
3200
|
async updateMany(props, globalClient) {
|
|
3071
|
-
var _a, _b, _c, _d, _e;
|
|
3201
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
3072
3202
|
// Maximum number of retries for database connection issues
|
|
3073
3203
|
const MAX_RETRIES = 3;
|
|
3074
3204
|
let retryCount = 0;
|
|
@@ -4166,21 +4296,52 @@ exports.OptionsContract = {
|
|
|
4166
4296
|
}
|
|
4167
4297
|
catch (error) {
|
|
4168
4298
|
lastError = error;
|
|
4299
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
4300
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
4301
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
4302
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
4303
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
4304
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
4305
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
4306
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
4307
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
4308
|
+
if (isConstraintViolation) {
|
|
4309
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
4310
|
+
logger_1.logger.error("Non-retryable constraint violation in updateManyOptionsContract", {
|
|
4311
|
+
operation: 'updateManyOptionsContract',
|
|
4312
|
+
model: 'OptionsContract',
|
|
4313
|
+
error: String(error),
|
|
4314
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
4315
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
4316
|
+
isRetryable: false,
|
|
4317
|
+
});
|
|
4318
|
+
throw error;
|
|
4319
|
+
}
|
|
4169
4320
|
// Check if this is a database connection error that we should retry
|
|
4170
|
-
const isConnectionError = ((
|
|
4171
|
-
((
|
|
4172
|
-
((
|
|
4173
|
-
((
|
|
4174
|
-
(error.networkError && ((
|
|
4321
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
4322
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
4323
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
4324
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
4325
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
4175
4326
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4176
4327
|
retryCount++;
|
|
4177
4328
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4178
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4329
|
+
logger_1.logger.warn("Database connection error in updateManyOptionsContract, retrying...", {
|
|
4330
|
+
operation: 'updateManyOptionsContract',
|
|
4331
|
+
model: 'OptionsContract',
|
|
4332
|
+
attempt: retryCount,
|
|
4333
|
+
maxRetries: MAX_RETRIES,
|
|
4334
|
+
});
|
|
4179
4335
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4180
4336
|
continue;
|
|
4181
4337
|
}
|
|
4182
|
-
// Log
|
|
4183
|
-
logger_1.logger.error("Database
|
|
4338
|
+
// Log structured error details and rethrow
|
|
4339
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
4340
|
+
operation: 'updateManyOptionsContract',
|
|
4341
|
+
model: 'OptionsContract',
|
|
4342
|
+
error: String(error),
|
|
4343
|
+
isRetryable: isConnectionError,
|
|
4344
|
+
});
|
|
4184
4345
|
throw error;
|
|
4185
4346
|
}
|
|
4186
4347
|
}
|
|
@@ -4195,7 +4356,7 @@ exports.OptionsContract = {
|
|
|
4195
4356
|
* @returns The deleted OptionsContract or null.
|
|
4196
4357
|
*/
|
|
4197
4358
|
async delete(props, globalClient) {
|
|
4198
|
-
var _a, _b, _c, _d, _e;
|
|
4359
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
4199
4360
|
// Maximum number of retries for database connection issues
|
|
4200
4361
|
const MAX_RETRIES = 3;
|
|
4201
4362
|
let retryCount = 0;
|
|
@@ -4239,21 +4400,58 @@ exports.OptionsContract = {
|
|
|
4239
4400
|
}
|
|
4240
4401
|
catch (error) {
|
|
4241
4402
|
lastError = error;
|
|
4403
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
4404
|
+
// (e.g., foreign key constraints preventing deletion)
|
|
4405
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
4406
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
4407
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
4408
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
4409
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
4410
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
4411
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('23503')) ||
|
|
4412
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2002')) ||
|
|
4413
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('P2003')) ||
|
|
4414
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('P2014'));
|
|
4415
|
+
if (isConstraintViolation) {
|
|
4416
|
+
const constraintMatch = (_l = error.message) === null || _l === void 0 ? void 0 : _l.match(/constraint\s+"([^"]+)"/);
|
|
4417
|
+
logger_1.logger.error("Non-retryable constraint violation in deleteOneOptionsContract", {
|
|
4418
|
+
operation: 'deleteOneOptionsContract',
|
|
4419
|
+
model: 'OptionsContract',
|
|
4420
|
+
error: String(error),
|
|
4421
|
+
recordId: props.id,
|
|
4422
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
4423
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
4424
|
+
isRetryable: false,
|
|
4425
|
+
});
|
|
4426
|
+
throw error;
|
|
4427
|
+
}
|
|
4242
4428
|
// Check if this is a database connection error that we should retry
|
|
4243
|
-
const isConnectionError = ((
|
|
4244
|
-
((
|
|
4245
|
-
((
|
|
4246
|
-
((
|
|
4247
|
-
(error.networkError && ((
|
|
4429
|
+
const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
|
|
4430
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
|
|
4431
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
|
|
4432
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
4433
|
+
(error.networkError && ((_r = error.networkError.message) === null || _r === void 0 ? void 0 : _r.includes('Failed to fetch')));
|
|
4248
4434
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4249
4435
|
retryCount++;
|
|
4250
4436
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4251
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4437
|
+
logger_1.logger.warn("Database connection error in deleteOneOptionsContract, retrying...", {
|
|
4438
|
+
operation: 'deleteOneOptionsContract',
|
|
4439
|
+
model: 'OptionsContract',
|
|
4440
|
+
attempt: retryCount,
|
|
4441
|
+
maxRetries: MAX_RETRIES,
|
|
4442
|
+
recordId: props.id,
|
|
4443
|
+
});
|
|
4252
4444
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4253
4445
|
continue;
|
|
4254
4446
|
}
|
|
4255
|
-
// Log
|
|
4256
|
-
logger_1.logger.error("Database
|
|
4447
|
+
// Log structured error details and rethrow
|
|
4448
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
4449
|
+
operation: 'deleteOneOptionsContract',
|
|
4450
|
+
model: 'OptionsContract',
|
|
4451
|
+
error: String(error),
|
|
4452
|
+
recordId: props.id,
|
|
4453
|
+
isRetryable: isConnectionError,
|
|
4454
|
+
});
|
|
4257
4455
|
throw error;
|
|
4258
4456
|
}
|
|
4259
4457
|
}
|
|
@@ -4323,12 +4521,22 @@ exports.OptionsContract = {
|
|
|
4323
4521
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4324
4522
|
retryCount++;
|
|
4325
4523
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4326
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4524
|
+
logger_1.logger.warn("Database connection error in getOptionsContract, retrying...", {
|
|
4525
|
+
operation: 'getOptionsContract',
|
|
4526
|
+
model: 'OptionsContract',
|
|
4527
|
+
attempt: retryCount,
|
|
4528
|
+
maxRetries: MAX_RETRIES,
|
|
4529
|
+
});
|
|
4327
4530
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4328
4531
|
continue;
|
|
4329
4532
|
}
|
|
4330
|
-
// Log
|
|
4331
|
-
logger_1.logger.error("Database
|
|
4533
|
+
// Log structured error details and rethrow
|
|
4534
|
+
logger_1.logger.error("Database get operation failed", {
|
|
4535
|
+
operation: 'getOptionsContract',
|
|
4536
|
+
model: 'OptionsContract',
|
|
4537
|
+
error: String(error),
|
|
4538
|
+
isRetryable: isConnectionError,
|
|
4539
|
+
});
|
|
4332
4540
|
throw error;
|
|
4333
4541
|
}
|
|
4334
4542
|
}
|
|
@@ -4386,12 +4594,22 @@ exports.OptionsContract = {
|
|
|
4386
4594
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4387
4595
|
retryCount++;
|
|
4388
4596
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4389
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4597
|
+
logger_1.logger.warn("Database connection error in getAllOptionsContract, retrying...", {
|
|
4598
|
+
operation: 'getAllOptionsContract',
|
|
4599
|
+
model: 'OptionsContract',
|
|
4600
|
+
attempt: retryCount,
|
|
4601
|
+
maxRetries: MAX_RETRIES,
|
|
4602
|
+
});
|
|
4390
4603
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4391
4604
|
continue;
|
|
4392
4605
|
}
|
|
4393
|
-
// Log
|
|
4394
|
-
logger_1.logger.error("Database
|
|
4606
|
+
// Log structured error details and rethrow
|
|
4607
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
4608
|
+
operation: 'getAllOptionsContract',
|
|
4609
|
+
model: 'OptionsContract',
|
|
4610
|
+
error: String(error),
|
|
4611
|
+
isRetryable: isConnectionError,
|
|
4612
|
+
});
|
|
4395
4613
|
throw error;
|
|
4396
4614
|
}
|
|
4397
4615
|
}
|
|
@@ -4468,12 +4686,22 @@ exports.OptionsContract = {
|
|
|
4468
4686
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4469
4687
|
retryCount++;
|
|
4470
4688
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4471
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4689
|
+
logger_1.logger.warn("Database connection error in findManyOptionsContract, retrying...", {
|
|
4690
|
+
operation: 'findManyOptionsContract',
|
|
4691
|
+
model: 'OptionsContract',
|
|
4692
|
+
attempt: retryCount,
|
|
4693
|
+
maxRetries: MAX_RETRIES,
|
|
4694
|
+
});
|
|
4472
4695
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4473
4696
|
continue;
|
|
4474
4697
|
}
|
|
4475
|
-
// Log
|
|
4476
|
-
logger_1.logger.error("Database
|
|
4698
|
+
// Log structured error details and rethrow
|
|
4699
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
4700
|
+
operation: 'findManyOptionsContract',
|
|
4701
|
+
model: 'OptionsContract',
|
|
4702
|
+
error: String(error),
|
|
4703
|
+
isRetryable: isConnectionError,
|
|
4704
|
+
});
|
|
4477
4705
|
throw error;
|
|
4478
4706
|
}
|
|
4479
4707
|
}
|