@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/Authenticator.cjs
CHANGED
|
@@ -208,7 +208,7 @@ exports.Authenticator = {
|
|
|
208
208
|
* @returns The created Authenticator 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;
|
|
@@ -573,21 +573,52 @@ exports.Authenticator = {
|
|
|
573
573
|
}
|
|
574
574
|
catch (error) {
|
|
575
575
|
lastError = error;
|
|
576
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
577
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
578
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
579
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
580
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
581
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
582
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
583
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
584
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
585
|
+
if (isConstraintViolation) {
|
|
586
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
587
|
+
logger_1.logger.error("Non-retryable constraint violation in createOneAuthenticator", {
|
|
588
|
+
operation: 'createOneAuthenticator',
|
|
589
|
+
model: 'Authenticator',
|
|
590
|
+
error: String(error),
|
|
591
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
592
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
593
|
+
isRetryable: false,
|
|
594
|
+
});
|
|
595
|
+
throw error;
|
|
596
|
+
}
|
|
576
597
|
// Check if this is a database connection error that we should retry
|
|
577
|
-
const isConnectionError = ((
|
|
578
|
-
((
|
|
579
|
-
((
|
|
580
|
-
((
|
|
581
|
-
(error.networkError && ((
|
|
598
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
599
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
600
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
601
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
602
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
582
603
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
583
604
|
retryCount++;
|
|
584
605
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
585
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
606
|
+
logger_1.logger.warn("Database connection error in createOneAuthenticator, retrying...", {
|
|
607
|
+
operation: 'createOneAuthenticator',
|
|
608
|
+
model: 'Authenticator',
|
|
609
|
+
attempt: retryCount,
|
|
610
|
+
maxRetries: MAX_RETRIES,
|
|
611
|
+
});
|
|
586
612
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
587
613
|
continue;
|
|
588
614
|
}
|
|
589
|
-
// Log
|
|
590
|
-
logger_1.logger.error("Database
|
|
615
|
+
// Log structured error details and rethrow
|
|
616
|
+
logger_1.logger.error("Database create operation failed", {
|
|
617
|
+
operation: 'createOneAuthenticator',
|
|
618
|
+
model: 'Authenticator',
|
|
619
|
+
error: String(error),
|
|
620
|
+
isRetryable: isConnectionError,
|
|
621
|
+
});
|
|
591
622
|
throw error;
|
|
592
623
|
}
|
|
593
624
|
}
|
|
@@ -602,7 +633,7 @@ exports.Authenticator = {
|
|
|
602
633
|
* @returns The count of created records or null.
|
|
603
634
|
*/
|
|
604
635
|
async createMany(props, globalClient) {
|
|
605
|
-
var _a, _b, _c, _d, _e;
|
|
636
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
606
637
|
// Maximum number of retries for database connection issues
|
|
607
638
|
const MAX_RETRIES = 3;
|
|
608
639
|
let retryCount = 0;
|
|
@@ -649,21 +680,52 @@ exports.Authenticator = {
|
|
|
649
680
|
}
|
|
650
681
|
catch (error) {
|
|
651
682
|
lastError = error;
|
|
683
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
684
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
685
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
686
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
687
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
688
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
689
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
690
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
691
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
692
|
+
if (isConstraintViolation) {
|
|
693
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
694
|
+
logger_1.logger.error("Non-retryable constraint violation in createManyAuthenticator", {
|
|
695
|
+
operation: 'createManyAuthenticator',
|
|
696
|
+
model: 'Authenticator',
|
|
697
|
+
error: String(error),
|
|
698
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
699
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
700
|
+
isRetryable: false,
|
|
701
|
+
});
|
|
702
|
+
throw error;
|
|
703
|
+
}
|
|
652
704
|
// Check if this is a database connection error that we should retry
|
|
653
|
-
const isConnectionError = ((
|
|
654
|
-
((
|
|
655
|
-
((
|
|
656
|
-
((
|
|
657
|
-
(error.networkError && ((
|
|
705
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
706
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
707
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
708
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
709
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
658
710
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
659
711
|
retryCount++;
|
|
660
712
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
661
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
713
|
+
logger_1.logger.warn("Database connection error in createManyAuthenticator, retrying...", {
|
|
714
|
+
operation: 'createManyAuthenticator',
|
|
715
|
+
model: 'Authenticator',
|
|
716
|
+
attempt: retryCount,
|
|
717
|
+
maxRetries: MAX_RETRIES,
|
|
718
|
+
});
|
|
662
719
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
663
720
|
continue;
|
|
664
721
|
}
|
|
665
|
-
// Log
|
|
666
|
-
logger_1.logger.error("Database
|
|
722
|
+
// Log structured error details and rethrow
|
|
723
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
724
|
+
operation: 'createManyAuthenticator',
|
|
725
|
+
model: 'Authenticator',
|
|
726
|
+
error: String(error),
|
|
727
|
+
isRetryable: isConnectionError,
|
|
728
|
+
});
|
|
667
729
|
throw error;
|
|
668
730
|
}
|
|
669
731
|
}
|
|
@@ -678,7 +740,7 @@ exports.Authenticator = {
|
|
|
678
740
|
* @returns The updated Authenticator or null.
|
|
679
741
|
*/
|
|
680
742
|
async update(props, globalClient) {
|
|
681
|
-
var _a, _b, _c, _d, _e;
|
|
743
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
682
744
|
// Maximum number of retries for database connection issues
|
|
683
745
|
const MAX_RETRIES = 3;
|
|
684
746
|
let retryCount = 0;
|
|
@@ -1819,21 +1881,55 @@ exports.Authenticator = {
|
|
|
1819
1881
|
}
|
|
1820
1882
|
catch (error) {
|
|
1821
1883
|
lastError = error;
|
|
1884
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
1885
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
1886
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
1887
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
1888
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
1889
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
1890
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
1891
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
1892
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
1893
|
+
if (isConstraintViolation) {
|
|
1894
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
1895
|
+
logger_1.logger.error("Non-retryable constraint violation in updateOneAuthenticator", {
|
|
1896
|
+
operation: 'updateOneAuthenticator',
|
|
1897
|
+
model: 'Authenticator',
|
|
1898
|
+
error: String(error),
|
|
1899
|
+
recordId: props.id,
|
|
1900
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
1901
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
1902
|
+
isRetryable: false,
|
|
1903
|
+
});
|
|
1904
|
+
throw error;
|
|
1905
|
+
}
|
|
1822
1906
|
// Check if this is a database connection error that we should retry
|
|
1823
|
-
const isConnectionError = ((
|
|
1824
|
-
((
|
|
1825
|
-
((
|
|
1826
|
-
((
|
|
1827
|
-
(error.networkError && ((
|
|
1907
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
1908
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
1909
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
1910
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1911
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
1828
1912
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1829
1913
|
retryCount++;
|
|
1830
1914
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
1831
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
1915
|
+
logger_1.logger.warn("Database connection error in updateOneAuthenticator, retrying...", {
|
|
1916
|
+
operation: 'updateOneAuthenticator',
|
|
1917
|
+
model: 'Authenticator',
|
|
1918
|
+
attempt: retryCount,
|
|
1919
|
+
maxRetries: MAX_RETRIES,
|
|
1920
|
+
recordId: props.id,
|
|
1921
|
+
});
|
|
1832
1922
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1833
1923
|
continue;
|
|
1834
1924
|
}
|
|
1835
|
-
// Log
|
|
1836
|
-
logger_1.logger.error("Database
|
|
1925
|
+
// Log structured error details and rethrow
|
|
1926
|
+
logger_1.logger.error("Database update operation failed", {
|
|
1927
|
+
operation: 'updateOneAuthenticator',
|
|
1928
|
+
model: 'Authenticator',
|
|
1929
|
+
error: String(error),
|
|
1930
|
+
recordId: props.id,
|
|
1931
|
+
isRetryable: isConnectionError,
|
|
1932
|
+
});
|
|
1837
1933
|
throw error;
|
|
1838
1934
|
}
|
|
1839
1935
|
}
|
|
@@ -1848,7 +1944,7 @@ exports.Authenticator = {
|
|
|
1848
1944
|
* @returns The updated Authenticator or null.
|
|
1849
1945
|
*/
|
|
1850
1946
|
async upsert(props, globalClient) {
|
|
1851
|
-
var _a, _b, _c, _d, _e;
|
|
1947
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
1852
1948
|
// Maximum number of retries for database connection issues
|
|
1853
1949
|
const MAX_RETRIES = 3;
|
|
1854
1950
|
let retryCount = 0;
|
|
@@ -3303,21 +3399,55 @@ exports.Authenticator = {
|
|
|
3303
3399
|
}
|
|
3304
3400
|
catch (error) {
|
|
3305
3401
|
lastError = error;
|
|
3402
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
3403
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
3404
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
3405
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
3406
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
3407
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
3408
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
3409
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
3410
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
3411
|
+
if (isConstraintViolation) {
|
|
3412
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
3413
|
+
logger_1.logger.error("Non-retryable constraint violation in upsertOneAuthenticator", {
|
|
3414
|
+
operation: 'upsertOneAuthenticator',
|
|
3415
|
+
model: 'Authenticator',
|
|
3416
|
+
error: String(error),
|
|
3417
|
+
recordId: props.id,
|
|
3418
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
3419
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
3420
|
+
isRetryable: false,
|
|
3421
|
+
});
|
|
3422
|
+
throw error;
|
|
3423
|
+
}
|
|
3306
3424
|
// Check if this is a database connection error that we should retry
|
|
3307
|
-
const isConnectionError = ((
|
|
3308
|
-
((
|
|
3309
|
-
((
|
|
3310
|
-
((
|
|
3311
|
-
(error.networkError && ((
|
|
3425
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
3426
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
3427
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
3428
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
3429
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
3312
3430
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
3313
3431
|
retryCount++;
|
|
3314
3432
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
3315
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
3433
|
+
logger_1.logger.warn("Database connection error in upsertOneAuthenticator, retrying...", {
|
|
3434
|
+
operation: 'upsertOneAuthenticator',
|
|
3435
|
+
model: 'Authenticator',
|
|
3436
|
+
attempt: retryCount,
|
|
3437
|
+
maxRetries: MAX_RETRIES,
|
|
3438
|
+
recordId: props.id,
|
|
3439
|
+
});
|
|
3316
3440
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
3317
3441
|
continue;
|
|
3318
3442
|
}
|
|
3319
|
-
// Log
|
|
3320
|
-
logger_1.logger.error("Database
|
|
3443
|
+
// Log structured error details and rethrow
|
|
3444
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
3445
|
+
operation: 'upsertOneAuthenticator',
|
|
3446
|
+
model: 'Authenticator',
|
|
3447
|
+
error: String(error),
|
|
3448
|
+
recordId: props.id,
|
|
3449
|
+
isRetryable: isConnectionError,
|
|
3450
|
+
});
|
|
3321
3451
|
throw error;
|
|
3322
3452
|
}
|
|
3323
3453
|
}
|
|
@@ -3332,7 +3462,7 @@ exports.Authenticator = {
|
|
|
3332
3462
|
* @returns The count of created records or null.
|
|
3333
3463
|
*/
|
|
3334
3464
|
async updateMany(props, globalClient) {
|
|
3335
|
-
var _a, _b, _c, _d, _e;
|
|
3465
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
3336
3466
|
// Maximum number of retries for database connection issues
|
|
3337
3467
|
const MAX_RETRIES = 3;
|
|
3338
3468
|
let retryCount = 0;
|
|
@@ -4473,21 +4603,52 @@ exports.Authenticator = {
|
|
|
4473
4603
|
}
|
|
4474
4604
|
catch (error) {
|
|
4475
4605
|
lastError = error;
|
|
4606
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
4607
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
4608
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
4609
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
4610
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
4611
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
4612
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
4613
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
4614
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
4615
|
+
if (isConstraintViolation) {
|
|
4616
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
4617
|
+
logger_1.logger.error("Non-retryable constraint violation in updateManyAuthenticator", {
|
|
4618
|
+
operation: 'updateManyAuthenticator',
|
|
4619
|
+
model: 'Authenticator',
|
|
4620
|
+
error: String(error),
|
|
4621
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
4622
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
4623
|
+
isRetryable: false,
|
|
4624
|
+
});
|
|
4625
|
+
throw error;
|
|
4626
|
+
}
|
|
4476
4627
|
// Check if this is a database connection error that we should retry
|
|
4477
|
-
const isConnectionError = ((
|
|
4478
|
-
((
|
|
4479
|
-
((
|
|
4480
|
-
((
|
|
4481
|
-
(error.networkError && ((
|
|
4628
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
4629
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
4630
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
4631
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
4632
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
4482
4633
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4483
4634
|
retryCount++;
|
|
4484
4635
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4485
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4636
|
+
logger_1.logger.warn("Database connection error in updateManyAuthenticator, retrying...", {
|
|
4637
|
+
operation: 'updateManyAuthenticator',
|
|
4638
|
+
model: 'Authenticator',
|
|
4639
|
+
attempt: retryCount,
|
|
4640
|
+
maxRetries: MAX_RETRIES,
|
|
4641
|
+
});
|
|
4486
4642
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4487
4643
|
continue;
|
|
4488
4644
|
}
|
|
4489
|
-
// Log
|
|
4490
|
-
logger_1.logger.error("Database
|
|
4645
|
+
// Log structured error details and rethrow
|
|
4646
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
4647
|
+
operation: 'updateManyAuthenticator',
|
|
4648
|
+
model: 'Authenticator',
|
|
4649
|
+
error: String(error),
|
|
4650
|
+
isRetryable: isConnectionError,
|
|
4651
|
+
});
|
|
4491
4652
|
throw error;
|
|
4492
4653
|
}
|
|
4493
4654
|
}
|
|
@@ -4502,7 +4663,7 @@ exports.Authenticator = {
|
|
|
4502
4663
|
* @returns The deleted Authenticator or null.
|
|
4503
4664
|
*/
|
|
4504
4665
|
async delete(props, globalClient) {
|
|
4505
|
-
var _a, _b, _c, _d, _e;
|
|
4666
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
4506
4667
|
// Maximum number of retries for database connection issues
|
|
4507
4668
|
const MAX_RETRIES = 3;
|
|
4508
4669
|
let retryCount = 0;
|
|
@@ -4546,21 +4707,58 @@ exports.Authenticator = {
|
|
|
4546
4707
|
}
|
|
4547
4708
|
catch (error) {
|
|
4548
4709
|
lastError = error;
|
|
4710
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
4711
|
+
// (e.g., foreign key constraints preventing deletion)
|
|
4712
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
4713
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
4714
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
4715
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
4716
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
4717
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
4718
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('23503')) ||
|
|
4719
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2002')) ||
|
|
4720
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('P2003')) ||
|
|
4721
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('P2014'));
|
|
4722
|
+
if (isConstraintViolation) {
|
|
4723
|
+
const constraintMatch = (_l = error.message) === null || _l === void 0 ? void 0 : _l.match(/constraint\s+"([^"]+)"/);
|
|
4724
|
+
logger_1.logger.error("Non-retryable constraint violation in deleteOneAuthenticator", {
|
|
4725
|
+
operation: 'deleteOneAuthenticator',
|
|
4726
|
+
model: 'Authenticator',
|
|
4727
|
+
error: String(error),
|
|
4728
|
+
recordId: props.id,
|
|
4729
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
4730
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
4731
|
+
isRetryable: false,
|
|
4732
|
+
});
|
|
4733
|
+
throw error;
|
|
4734
|
+
}
|
|
4549
4735
|
// Check if this is a database connection error that we should retry
|
|
4550
|
-
const isConnectionError = ((
|
|
4551
|
-
((
|
|
4552
|
-
((
|
|
4553
|
-
((
|
|
4554
|
-
(error.networkError && ((
|
|
4736
|
+
const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
|
|
4737
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
|
|
4738
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
|
|
4739
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
4740
|
+
(error.networkError && ((_r = error.networkError.message) === null || _r === void 0 ? void 0 : _r.includes('Failed to fetch')));
|
|
4555
4741
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4556
4742
|
retryCount++;
|
|
4557
4743
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4558
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4744
|
+
logger_1.logger.warn("Database connection error in deleteOneAuthenticator, retrying...", {
|
|
4745
|
+
operation: 'deleteOneAuthenticator',
|
|
4746
|
+
model: 'Authenticator',
|
|
4747
|
+
attempt: retryCount,
|
|
4748
|
+
maxRetries: MAX_RETRIES,
|
|
4749
|
+
recordId: props.id,
|
|
4750
|
+
});
|
|
4559
4751
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4560
4752
|
continue;
|
|
4561
4753
|
}
|
|
4562
|
-
// Log
|
|
4563
|
-
logger_1.logger.error("Database
|
|
4754
|
+
// Log structured error details and rethrow
|
|
4755
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
4756
|
+
operation: 'deleteOneAuthenticator',
|
|
4757
|
+
model: 'Authenticator',
|
|
4758
|
+
error: String(error),
|
|
4759
|
+
recordId: props.id,
|
|
4760
|
+
isRetryable: isConnectionError,
|
|
4761
|
+
});
|
|
4564
4762
|
throw error;
|
|
4565
4763
|
}
|
|
4566
4764
|
}
|
|
@@ -4630,12 +4828,22 @@ exports.Authenticator = {
|
|
|
4630
4828
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4631
4829
|
retryCount++;
|
|
4632
4830
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4633
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4831
|
+
logger_1.logger.warn("Database connection error in getAuthenticator, retrying...", {
|
|
4832
|
+
operation: 'getAuthenticator',
|
|
4833
|
+
model: 'Authenticator',
|
|
4834
|
+
attempt: retryCount,
|
|
4835
|
+
maxRetries: MAX_RETRIES,
|
|
4836
|
+
});
|
|
4634
4837
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4635
4838
|
continue;
|
|
4636
4839
|
}
|
|
4637
|
-
// Log
|
|
4638
|
-
logger_1.logger.error("Database
|
|
4840
|
+
// Log structured error details and rethrow
|
|
4841
|
+
logger_1.logger.error("Database get operation failed", {
|
|
4842
|
+
operation: 'getAuthenticator',
|
|
4843
|
+
model: 'Authenticator',
|
|
4844
|
+
error: String(error),
|
|
4845
|
+
isRetryable: isConnectionError,
|
|
4846
|
+
});
|
|
4639
4847
|
throw error;
|
|
4640
4848
|
}
|
|
4641
4849
|
}
|
|
@@ -4693,12 +4901,22 @@ exports.Authenticator = {
|
|
|
4693
4901
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4694
4902
|
retryCount++;
|
|
4695
4903
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4696
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4904
|
+
logger_1.logger.warn("Database connection error in getAllAuthenticator, retrying...", {
|
|
4905
|
+
operation: 'getAllAuthenticator',
|
|
4906
|
+
model: 'Authenticator',
|
|
4907
|
+
attempt: retryCount,
|
|
4908
|
+
maxRetries: MAX_RETRIES,
|
|
4909
|
+
});
|
|
4697
4910
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4698
4911
|
continue;
|
|
4699
4912
|
}
|
|
4700
|
-
// Log
|
|
4701
|
-
logger_1.logger.error("Database
|
|
4913
|
+
// Log structured error details and rethrow
|
|
4914
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
4915
|
+
operation: 'getAllAuthenticator',
|
|
4916
|
+
model: 'Authenticator',
|
|
4917
|
+
error: String(error),
|
|
4918
|
+
isRetryable: isConnectionError,
|
|
4919
|
+
});
|
|
4702
4920
|
throw error;
|
|
4703
4921
|
}
|
|
4704
4922
|
}
|
|
@@ -4775,12 +4993,22 @@ exports.Authenticator = {
|
|
|
4775
4993
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4776
4994
|
retryCount++;
|
|
4777
4995
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4778
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4996
|
+
logger_1.logger.warn("Database connection error in findManyAuthenticator, retrying...", {
|
|
4997
|
+
operation: 'findManyAuthenticator',
|
|
4998
|
+
model: 'Authenticator',
|
|
4999
|
+
attempt: retryCount,
|
|
5000
|
+
maxRetries: MAX_RETRIES,
|
|
5001
|
+
});
|
|
4779
5002
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4780
5003
|
continue;
|
|
4781
5004
|
}
|
|
4782
|
-
// Log
|
|
4783
|
-
logger_1.logger.error("Database
|
|
5005
|
+
// Log structured error details and rethrow
|
|
5006
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
5007
|
+
operation: 'findManyAuthenticator',
|
|
5008
|
+
model: 'Authenticator',
|
|
5009
|
+
error: String(error),
|
|
5010
|
+
isRetryable: isConnectionError,
|
|
5011
|
+
});
|
|
4784
5012
|
throw error;
|
|
4785
5013
|
}
|
|
4786
5014
|
}
|