@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/LinkedProvider.cjs
CHANGED
|
@@ -208,7 +208,7 @@ exports.LinkedProvider = {
|
|
|
208
208
|
* @returns The created LinkedProvider or null.
|
|
209
209
|
*/
|
|
210
210
|
async create(props, globalClient) {
|
|
211
|
-
var _a, _b, _c, _d, _e;
|
|
211
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
212
212
|
// Maximum number of retries for database connection issues
|
|
213
213
|
const MAX_RETRIES = 3;
|
|
214
214
|
let retryCount = 0;
|
|
@@ -567,21 +567,52 @@ exports.LinkedProvider = {
|
|
|
567
567
|
}
|
|
568
568
|
catch (error) {
|
|
569
569
|
lastError = error;
|
|
570
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
571
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
572
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
573
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
574
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
575
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
576
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
577
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
578
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
579
|
+
if (isConstraintViolation) {
|
|
580
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
581
|
+
logger_1.logger.error("Non-retryable constraint violation in createOneLinkedProvider", {
|
|
582
|
+
operation: 'createOneLinkedProvider',
|
|
583
|
+
model: 'LinkedProvider',
|
|
584
|
+
error: String(error),
|
|
585
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
586
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
587
|
+
isRetryable: false,
|
|
588
|
+
});
|
|
589
|
+
throw error;
|
|
590
|
+
}
|
|
570
591
|
// Check if this is a database connection error that we should retry
|
|
571
|
-
const isConnectionError = ((
|
|
572
|
-
((
|
|
573
|
-
((
|
|
574
|
-
((
|
|
575
|
-
(error.networkError && ((
|
|
592
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
593
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
594
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
595
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
596
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
576
597
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
577
598
|
retryCount++;
|
|
578
599
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
579
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
600
|
+
logger_1.logger.warn("Database connection error in createOneLinkedProvider, retrying...", {
|
|
601
|
+
operation: 'createOneLinkedProvider',
|
|
602
|
+
model: 'LinkedProvider',
|
|
603
|
+
attempt: retryCount,
|
|
604
|
+
maxRetries: MAX_RETRIES,
|
|
605
|
+
});
|
|
580
606
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
581
607
|
continue;
|
|
582
608
|
}
|
|
583
|
-
// Log
|
|
584
|
-
logger_1.logger.error("Database
|
|
609
|
+
// Log structured error details and rethrow
|
|
610
|
+
logger_1.logger.error("Database create operation failed", {
|
|
611
|
+
operation: 'createOneLinkedProvider',
|
|
612
|
+
model: 'LinkedProvider',
|
|
613
|
+
error: String(error),
|
|
614
|
+
isRetryable: isConnectionError,
|
|
615
|
+
});
|
|
585
616
|
throw error;
|
|
586
617
|
}
|
|
587
618
|
}
|
|
@@ -596,7 +627,7 @@ exports.LinkedProvider = {
|
|
|
596
627
|
* @returns The count of created records or null.
|
|
597
628
|
*/
|
|
598
629
|
async createMany(props, globalClient) {
|
|
599
|
-
var _a, _b, _c, _d, _e;
|
|
630
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
600
631
|
// Maximum number of retries for database connection issues
|
|
601
632
|
const MAX_RETRIES = 3;
|
|
602
633
|
let retryCount = 0;
|
|
@@ -647,21 +678,52 @@ exports.LinkedProvider = {
|
|
|
647
678
|
}
|
|
648
679
|
catch (error) {
|
|
649
680
|
lastError = error;
|
|
681
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
682
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
683
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
684
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
685
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
686
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
687
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
688
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
689
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
690
|
+
if (isConstraintViolation) {
|
|
691
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
692
|
+
logger_1.logger.error("Non-retryable constraint violation in createManyLinkedProvider", {
|
|
693
|
+
operation: 'createManyLinkedProvider',
|
|
694
|
+
model: 'LinkedProvider',
|
|
695
|
+
error: String(error),
|
|
696
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
697
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
698
|
+
isRetryable: false,
|
|
699
|
+
});
|
|
700
|
+
throw error;
|
|
701
|
+
}
|
|
650
702
|
// Check if this is a database connection error that we should retry
|
|
651
|
-
const isConnectionError = ((
|
|
652
|
-
((
|
|
653
|
-
((
|
|
654
|
-
((
|
|
655
|
-
(error.networkError && ((
|
|
703
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
704
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
705
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
706
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
707
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
656
708
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
657
709
|
retryCount++;
|
|
658
710
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
659
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
711
|
+
logger_1.logger.warn("Database connection error in createManyLinkedProvider, retrying...", {
|
|
712
|
+
operation: 'createManyLinkedProvider',
|
|
713
|
+
model: 'LinkedProvider',
|
|
714
|
+
attempt: retryCount,
|
|
715
|
+
maxRetries: MAX_RETRIES,
|
|
716
|
+
});
|
|
660
717
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
661
718
|
continue;
|
|
662
719
|
}
|
|
663
|
-
// Log
|
|
664
|
-
logger_1.logger.error("Database
|
|
720
|
+
// Log structured error details and rethrow
|
|
721
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
722
|
+
operation: 'createManyLinkedProvider',
|
|
723
|
+
model: 'LinkedProvider',
|
|
724
|
+
error: String(error),
|
|
725
|
+
isRetryable: isConnectionError,
|
|
726
|
+
});
|
|
665
727
|
throw error;
|
|
666
728
|
}
|
|
667
729
|
}
|
|
@@ -676,7 +738,7 @@ exports.LinkedProvider = {
|
|
|
676
738
|
* @returns The updated LinkedProvider or null.
|
|
677
739
|
*/
|
|
678
740
|
async update(props, globalClient) {
|
|
679
|
-
var _a, _b, _c, _d, _e;
|
|
741
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
680
742
|
// Maximum number of retries for database connection issues
|
|
681
743
|
const MAX_RETRIES = 3;
|
|
682
744
|
let retryCount = 0;
|
|
@@ -1800,21 +1862,55 @@ exports.LinkedProvider = {
|
|
|
1800
1862
|
}
|
|
1801
1863
|
catch (error) {
|
|
1802
1864
|
lastError = error;
|
|
1865
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
1866
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
1867
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
1868
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
1869
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
1870
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
1871
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
1872
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
1873
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
1874
|
+
if (isConstraintViolation) {
|
|
1875
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
1876
|
+
logger_1.logger.error("Non-retryable constraint violation in updateOneLinkedProvider", {
|
|
1877
|
+
operation: 'updateOneLinkedProvider',
|
|
1878
|
+
model: 'LinkedProvider',
|
|
1879
|
+
error: String(error),
|
|
1880
|
+
recordId: props.id,
|
|
1881
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
1882
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
1883
|
+
isRetryable: false,
|
|
1884
|
+
});
|
|
1885
|
+
throw error;
|
|
1886
|
+
}
|
|
1803
1887
|
// Check if this is a database connection error that we should retry
|
|
1804
|
-
const isConnectionError = ((
|
|
1805
|
-
((
|
|
1806
|
-
((
|
|
1807
|
-
((
|
|
1808
|
-
(error.networkError && ((
|
|
1888
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
1889
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
1890
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
1891
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1892
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
1809
1893
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1810
1894
|
retryCount++;
|
|
1811
1895
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
1812
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
1896
|
+
logger_1.logger.warn("Database connection error in updateOneLinkedProvider, retrying...", {
|
|
1897
|
+
operation: 'updateOneLinkedProvider',
|
|
1898
|
+
model: 'LinkedProvider',
|
|
1899
|
+
attempt: retryCount,
|
|
1900
|
+
maxRetries: MAX_RETRIES,
|
|
1901
|
+
recordId: props.id,
|
|
1902
|
+
});
|
|
1813
1903
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1814
1904
|
continue;
|
|
1815
1905
|
}
|
|
1816
|
-
// Log
|
|
1817
|
-
logger_1.logger.error("Database
|
|
1906
|
+
// Log structured error details and rethrow
|
|
1907
|
+
logger_1.logger.error("Database update operation failed", {
|
|
1908
|
+
operation: 'updateOneLinkedProvider',
|
|
1909
|
+
model: 'LinkedProvider',
|
|
1910
|
+
error: String(error),
|
|
1911
|
+
recordId: props.id,
|
|
1912
|
+
isRetryable: isConnectionError,
|
|
1913
|
+
});
|
|
1818
1914
|
throw error;
|
|
1819
1915
|
}
|
|
1820
1916
|
}
|
|
@@ -1829,7 +1925,7 @@ exports.LinkedProvider = {
|
|
|
1829
1925
|
* @returns The updated LinkedProvider or null.
|
|
1830
1926
|
*/
|
|
1831
1927
|
async upsert(props, globalClient) {
|
|
1832
|
-
var _a, _b, _c, _d, _e;
|
|
1928
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
1833
1929
|
// Maximum number of retries for database connection issues
|
|
1834
1930
|
const MAX_RETRIES = 3;
|
|
1835
1931
|
let retryCount = 0;
|
|
@@ -3264,21 +3360,55 @@ exports.LinkedProvider = {
|
|
|
3264
3360
|
}
|
|
3265
3361
|
catch (error) {
|
|
3266
3362
|
lastError = error;
|
|
3363
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
3364
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
3365
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
3366
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
3367
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
3368
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
3369
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
3370
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
3371
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
3372
|
+
if (isConstraintViolation) {
|
|
3373
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
3374
|
+
logger_1.logger.error("Non-retryable constraint violation in upsertOneLinkedProvider", {
|
|
3375
|
+
operation: 'upsertOneLinkedProvider',
|
|
3376
|
+
model: 'LinkedProvider',
|
|
3377
|
+
error: String(error),
|
|
3378
|
+
recordId: props.id,
|
|
3379
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
3380
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
3381
|
+
isRetryable: false,
|
|
3382
|
+
});
|
|
3383
|
+
throw error;
|
|
3384
|
+
}
|
|
3267
3385
|
// Check if this is a database connection error that we should retry
|
|
3268
|
-
const isConnectionError = ((
|
|
3269
|
-
((
|
|
3270
|
-
((
|
|
3271
|
-
((
|
|
3272
|
-
(error.networkError && ((
|
|
3386
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
3387
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
3388
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
3389
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
3390
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
3273
3391
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
3274
3392
|
retryCount++;
|
|
3275
3393
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
3276
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
3394
|
+
logger_1.logger.warn("Database connection error in upsertOneLinkedProvider, retrying...", {
|
|
3395
|
+
operation: 'upsertOneLinkedProvider',
|
|
3396
|
+
model: 'LinkedProvider',
|
|
3397
|
+
attempt: retryCount,
|
|
3398
|
+
maxRetries: MAX_RETRIES,
|
|
3399
|
+
recordId: props.id,
|
|
3400
|
+
});
|
|
3277
3401
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
3278
3402
|
continue;
|
|
3279
3403
|
}
|
|
3280
|
-
// Log
|
|
3281
|
-
logger_1.logger.error("Database
|
|
3404
|
+
// Log structured error details and rethrow
|
|
3405
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
3406
|
+
operation: 'upsertOneLinkedProvider',
|
|
3407
|
+
model: 'LinkedProvider',
|
|
3408
|
+
error: String(error),
|
|
3409
|
+
recordId: props.id,
|
|
3410
|
+
isRetryable: isConnectionError,
|
|
3411
|
+
});
|
|
3282
3412
|
throw error;
|
|
3283
3413
|
}
|
|
3284
3414
|
}
|
|
@@ -3293,7 +3423,7 @@ exports.LinkedProvider = {
|
|
|
3293
3423
|
* @returns The count of created records or null.
|
|
3294
3424
|
*/
|
|
3295
3425
|
async updateMany(props, globalClient) {
|
|
3296
|
-
var _a, _b, _c, _d, _e;
|
|
3426
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
3297
3427
|
// Maximum number of retries for database connection issues
|
|
3298
3428
|
const MAX_RETRIES = 3;
|
|
3299
3429
|
let retryCount = 0;
|
|
@@ -4417,21 +4547,52 @@ exports.LinkedProvider = {
|
|
|
4417
4547
|
}
|
|
4418
4548
|
catch (error) {
|
|
4419
4549
|
lastError = error;
|
|
4550
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
4551
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
4552
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
4553
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
4554
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
4555
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
4556
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
4557
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
4558
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
4559
|
+
if (isConstraintViolation) {
|
|
4560
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
4561
|
+
logger_1.logger.error("Non-retryable constraint violation in updateManyLinkedProvider", {
|
|
4562
|
+
operation: 'updateManyLinkedProvider',
|
|
4563
|
+
model: 'LinkedProvider',
|
|
4564
|
+
error: String(error),
|
|
4565
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
4566
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
4567
|
+
isRetryable: false,
|
|
4568
|
+
});
|
|
4569
|
+
throw error;
|
|
4570
|
+
}
|
|
4420
4571
|
// Check if this is a database connection error that we should retry
|
|
4421
|
-
const isConnectionError = ((
|
|
4422
|
-
((
|
|
4423
|
-
((
|
|
4424
|
-
((
|
|
4425
|
-
(error.networkError && ((
|
|
4572
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
4573
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
4574
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
4575
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
4576
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
4426
4577
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4427
4578
|
retryCount++;
|
|
4428
4579
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4429
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4580
|
+
logger_1.logger.warn("Database connection error in updateManyLinkedProvider, retrying...", {
|
|
4581
|
+
operation: 'updateManyLinkedProvider',
|
|
4582
|
+
model: 'LinkedProvider',
|
|
4583
|
+
attempt: retryCount,
|
|
4584
|
+
maxRetries: MAX_RETRIES,
|
|
4585
|
+
});
|
|
4430
4586
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4431
4587
|
continue;
|
|
4432
4588
|
}
|
|
4433
|
-
// Log
|
|
4434
|
-
logger_1.logger.error("Database
|
|
4589
|
+
// Log structured error details and rethrow
|
|
4590
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
4591
|
+
operation: 'updateManyLinkedProvider',
|
|
4592
|
+
model: 'LinkedProvider',
|
|
4593
|
+
error: String(error),
|
|
4594
|
+
isRetryable: isConnectionError,
|
|
4595
|
+
});
|
|
4435
4596
|
throw error;
|
|
4436
4597
|
}
|
|
4437
4598
|
}
|
|
@@ -4446,7 +4607,7 @@ exports.LinkedProvider = {
|
|
|
4446
4607
|
* @returns The deleted LinkedProvider or null.
|
|
4447
4608
|
*/
|
|
4448
4609
|
async delete(props, globalClient) {
|
|
4449
|
-
var _a, _b, _c, _d, _e;
|
|
4610
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
4450
4611
|
// Maximum number of retries for database connection issues
|
|
4451
4612
|
const MAX_RETRIES = 3;
|
|
4452
4613
|
let retryCount = 0;
|
|
@@ -4490,21 +4651,58 @@ exports.LinkedProvider = {
|
|
|
4490
4651
|
}
|
|
4491
4652
|
catch (error) {
|
|
4492
4653
|
lastError = error;
|
|
4654
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
4655
|
+
// (e.g., foreign key constraints preventing deletion)
|
|
4656
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
4657
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
4658
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
4659
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
4660
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
4661
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
4662
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('23503')) ||
|
|
4663
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2002')) ||
|
|
4664
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('P2003')) ||
|
|
4665
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('P2014'));
|
|
4666
|
+
if (isConstraintViolation) {
|
|
4667
|
+
const constraintMatch = (_l = error.message) === null || _l === void 0 ? void 0 : _l.match(/constraint\s+"([^"]+)"/);
|
|
4668
|
+
logger_1.logger.error("Non-retryable constraint violation in deleteOneLinkedProvider", {
|
|
4669
|
+
operation: 'deleteOneLinkedProvider',
|
|
4670
|
+
model: 'LinkedProvider',
|
|
4671
|
+
error: String(error),
|
|
4672
|
+
recordId: props.id,
|
|
4673
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
4674
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
4675
|
+
isRetryable: false,
|
|
4676
|
+
});
|
|
4677
|
+
throw error;
|
|
4678
|
+
}
|
|
4493
4679
|
// Check if this is a database connection error that we should retry
|
|
4494
|
-
const isConnectionError = ((
|
|
4495
|
-
((
|
|
4496
|
-
((
|
|
4497
|
-
((
|
|
4498
|
-
(error.networkError && ((
|
|
4680
|
+
const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
|
|
4681
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
|
|
4682
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
|
|
4683
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
4684
|
+
(error.networkError && ((_r = error.networkError.message) === null || _r === void 0 ? void 0 : _r.includes('Failed to fetch')));
|
|
4499
4685
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4500
4686
|
retryCount++;
|
|
4501
4687
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4502
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4688
|
+
logger_1.logger.warn("Database connection error in deleteOneLinkedProvider, retrying...", {
|
|
4689
|
+
operation: 'deleteOneLinkedProvider',
|
|
4690
|
+
model: 'LinkedProvider',
|
|
4691
|
+
attempt: retryCount,
|
|
4692
|
+
maxRetries: MAX_RETRIES,
|
|
4693
|
+
recordId: props.id,
|
|
4694
|
+
});
|
|
4503
4695
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4504
4696
|
continue;
|
|
4505
4697
|
}
|
|
4506
|
-
// Log
|
|
4507
|
-
logger_1.logger.error("Database
|
|
4698
|
+
// Log structured error details and rethrow
|
|
4699
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
4700
|
+
operation: 'deleteOneLinkedProvider',
|
|
4701
|
+
model: 'LinkedProvider',
|
|
4702
|
+
error: String(error),
|
|
4703
|
+
recordId: props.id,
|
|
4704
|
+
isRetryable: isConnectionError,
|
|
4705
|
+
});
|
|
4508
4706
|
throw error;
|
|
4509
4707
|
}
|
|
4510
4708
|
}
|
|
@@ -4580,12 +4778,22 @@ exports.LinkedProvider = {
|
|
|
4580
4778
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4581
4779
|
retryCount++;
|
|
4582
4780
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4583
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4781
|
+
logger_1.logger.warn("Database connection error in getLinkedProvider, retrying...", {
|
|
4782
|
+
operation: 'getLinkedProvider',
|
|
4783
|
+
model: 'LinkedProvider',
|
|
4784
|
+
attempt: retryCount,
|
|
4785
|
+
maxRetries: MAX_RETRIES,
|
|
4786
|
+
});
|
|
4584
4787
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4585
4788
|
continue;
|
|
4586
4789
|
}
|
|
4587
|
-
// Log
|
|
4588
|
-
logger_1.logger.error("Database
|
|
4790
|
+
// Log structured error details and rethrow
|
|
4791
|
+
logger_1.logger.error("Database get operation failed", {
|
|
4792
|
+
operation: 'getLinkedProvider',
|
|
4793
|
+
model: 'LinkedProvider',
|
|
4794
|
+
error: String(error),
|
|
4795
|
+
isRetryable: isConnectionError,
|
|
4796
|
+
});
|
|
4589
4797
|
throw error;
|
|
4590
4798
|
}
|
|
4591
4799
|
}
|
|
@@ -4643,12 +4851,22 @@ exports.LinkedProvider = {
|
|
|
4643
4851
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4644
4852
|
retryCount++;
|
|
4645
4853
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4646
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4854
|
+
logger_1.logger.warn("Database connection error in getAllLinkedProvider, retrying...", {
|
|
4855
|
+
operation: 'getAllLinkedProvider',
|
|
4856
|
+
model: 'LinkedProvider',
|
|
4857
|
+
attempt: retryCount,
|
|
4858
|
+
maxRetries: MAX_RETRIES,
|
|
4859
|
+
});
|
|
4647
4860
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4648
4861
|
continue;
|
|
4649
4862
|
}
|
|
4650
|
-
// Log
|
|
4651
|
-
logger_1.logger.error("Database
|
|
4863
|
+
// Log structured error details and rethrow
|
|
4864
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
4865
|
+
operation: 'getAllLinkedProvider',
|
|
4866
|
+
model: 'LinkedProvider',
|
|
4867
|
+
error: String(error),
|
|
4868
|
+
isRetryable: isConnectionError,
|
|
4869
|
+
});
|
|
4652
4870
|
throw error;
|
|
4653
4871
|
}
|
|
4654
4872
|
}
|
|
@@ -4731,12 +4949,22 @@ exports.LinkedProvider = {
|
|
|
4731
4949
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4732
4950
|
retryCount++;
|
|
4733
4951
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4734
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4952
|
+
logger_1.logger.warn("Database connection error in findManyLinkedProvider, retrying...", {
|
|
4953
|
+
operation: 'findManyLinkedProvider',
|
|
4954
|
+
model: 'LinkedProvider',
|
|
4955
|
+
attempt: retryCount,
|
|
4956
|
+
maxRetries: MAX_RETRIES,
|
|
4957
|
+
});
|
|
4735
4958
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4736
4959
|
continue;
|
|
4737
4960
|
}
|
|
4738
|
-
// Log
|
|
4739
|
-
logger_1.logger.error("Database
|
|
4961
|
+
// Log structured error details and rethrow
|
|
4962
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
4963
|
+
operation: 'findManyLinkedProvider',
|
|
4964
|
+
model: 'LinkedProvider',
|
|
4965
|
+
error: String(error),
|
|
4966
|
+
isRetryable: isConnectionError,
|
|
4967
|
+
});
|
|
4740
4968
|
throw error;
|
|
4741
4969
|
}
|
|
4742
4970
|
}
|