@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/WaitlistEntry.cjs
CHANGED
|
@@ -208,7 +208,7 @@ exports.WaitlistEntry = {
|
|
|
208
208
|
* @returns The created WaitlistEntry 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;
|
|
@@ -575,21 +575,52 @@ exports.WaitlistEntry = {
|
|
|
575
575
|
}
|
|
576
576
|
catch (error) {
|
|
577
577
|
lastError = error;
|
|
578
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
579
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
580
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
581
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
582
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
583
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
584
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
585
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
586
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
587
|
+
if (isConstraintViolation) {
|
|
588
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
589
|
+
logger_1.logger.error("Non-retryable constraint violation in createOneWaitlistEntry", {
|
|
590
|
+
operation: 'createOneWaitlistEntry',
|
|
591
|
+
model: 'WaitlistEntry',
|
|
592
|
+
error: String(error),
|
|
593
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
594
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
595
|
+
isRetryable: false,
|
|
596
|
+
});
|
|
597
|
+
throw error;
|
|
598
|
+
}
|
|
578
599
|
// Check if this is a database connection error that we should retry
|
|
579
|
-
const isConnectionError = ((
|
|
580
|
-
((
|
|
581
|
-
((
|
|
582
|
-
((
|
|
583
|
-
(error.networkError && ((
|
|
600
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
601
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
602
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
603
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
604
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
584
605
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
585
606
|
retryCount++;
|
|
586
607
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
587
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
608
|
+
logger_1.logger.warn("Database connection error in createOneWaitlistEntry, retrying...", {
|
|
609
|
+
operation: 'createOneWaitlistEntry',
|
|
610
|
+
model: 'WaitlistEntry',
|
|
611
|
+
attempt: retryCount,
|
|
612
|
+
maxRetries: MAX_RETRIES,
|
|
613
|
+
});
|
|
588
614
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
589
615
|
continue;
|
|
590
616
|
}
|
|
591
|
-
// Log
|
|
592
|
-
logger_1.logger.error("Database
|
|
617
|
+
// Log structured error details and rethrow
|
|
618
|
+
logger_1.logger.error("Database create operation failed", {
|
|
619
|
+
operation: 'createOneWaitlistEntry',
|
|
620
|
+
model: 'WaitlistEntry',
|
|
621
|
+
error: String(error),
|
|
622
|
+
isRetryable: isConnectionError,
|
|
623
|
+
});
|
|
593
624
|
throw error;
|
|
594
625
|
}
|
|
595
626
|
}
|
|
@@ -604,7 +635,7 @@ exports.WaitlistEntry = {
|
|
|
604
635
|
* @returns The count of created records or null.
|
|
605
636
|
*/
|
|
606
637
|
async createMany(props, globalClient) {
|
|
607
|
-
var _a, _b, _c, _d, _e;
|
|
638
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
608
639
|
// Maximum number of retries for database connection issues
|
|
609
640
|
const MAX_RETRIES = 3;
|
|
610
641
|
let retryCount = 0;
|
|
@@ -657,21 +688,52 @@ exports.WaitlistEntry = {
|
|
|
657
688
|
}
|
|
658
689
|
catch (error) {
|
|
659
690
|
lastError = error;
|
|
691
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
692
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
693
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
694
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
695
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
696
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
697
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
698
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
699
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
700
|
+
if (isConstraintViolation) {
|
|
701
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
702
|
+
logger_1.logger.error("Non-retryable constraint violation in createManyWaitlistEntry", {
|
|
703
|
+
operation: 'createManyWaitlistEntry',
|
|
704
|
+
model: 'WaitlistEntry',
|
|
705
|
+
error: String(error),
|
|
706
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
707
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
708
|
+
isRetryable: false,
|
|
709
|
+
});
|
|
710
|
+
throw error;
|
|
711
|
+
}
|
|
660
712
|
// Check if this is a database connection error that we should retry
|
|
661
|
-
const isConnectionError = ((
|
|
662
|
-
((
|
|
663
|
-
((
|
|
664
|
-
((
|
|
665
|
-
(error.networkError && ((
|
|
713
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
714
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
715
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
716
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
717
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
666
718
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
667
719
|
retryCount++;
|
|
668
720
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
669
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
721
|
+
logger_1.logger.warn("Database connection error in createManyWaitlistEntry, retrying...", {
|
|
722
|
+
operation: 'createManyWaitlistEntry',
|
|
723
|
+
model: 'WaitlistEntry',
|
|
724
|
+
attempt: retryCount,
|
|
725
|
+
maxRetries: MAX_RETRIES,
|
|
726
|
+
});
|
|
670
727
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
671
728
|
continue;
|
|
672
729
|
}
|
|
673
|
-
// Log
|
|
674
|
-
logger_1.logger.error("Database
|
|
730
|
+
// Log structured error details and rethrow
|
|
731
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
732
|
+
operation: 'createManyWaitlistEntry',
|
|
733
|
+
model: 'WaitlistEntry',
|
|
734
|
+
error: String(error),
|
|
735
|
+
isRetryable: isConnectionError,
|
|
736
|
+
});
|
|
675
737
|
throw error;
|
|
676
738
|
}
|
|
677
739
|
}
|
|
@@ -686,7 +748,7 @@ exports.WaitlistEntry = {
|
|
|
686
748
|
* @returns The updated WaitlistEntry or null.
|
|
687
749
|
*/
|
|
688
750
|
async update(props, globalClient) {
|
|
689
|
-
var _a, _b, _c, _d, _e;
|
|
751
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
690
752
|
// Maximum number of retries for database connection issues
|
|
691
753
|
const MAX_RETRIES = 3;
|
|
692
754
|
let retryCount = 0;
|
|
@@ -1768,21 +1830,55 @@ exports.WaitlistEntry = {
|
|
|
1768
1830
|
}
|
|
1769
1831
|
catch (error) {
|
|
1770
1832
|
lastError = error;
|
|
1833
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
1834
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
1835
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
1836
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
1837
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
1838
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
1839
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
1840
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
1841
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
1842
|
+
if (isConstraintViolation) {
|
|
1843
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
1844
|
+
logger_1.logger.error("Non-retryable constraint violation in updateOneWaitlistEntry", {
|
|
1845
|
+
operation: 'updateOneWaitlistEntry',
|
|
1846
|
+
model: 'WaitlistEntry',
|
|
1847
|
+
error: String(error),
|
|
1848
|
+
recordId: props.id,
|
|
1849
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
1850
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
1851
|
+
isRetryable: false,
|
|
1852
|
+
});
|
|
1853
|
+
throw error;
|
|
1854
|
+
}
|
|
1771
1855
|
// Check if this is a database connection error that we should retry
|
|
1772
|
-
const isConnectionError = ((
|
|
1773
|
-
((
|
|
1774
|
-
((
|
|
1775
|
-
((
|
|
1776
|
-
(error.networkError && ((
|
|
1856
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
1857
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
1858
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
1859
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
1860
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
1777
1861
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
1778
1862
|
retryCount++;
|
|
1779
1863
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
1780
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
1864
|
+
logger_1.logger.warn("Database connection error in updateOneWaitlistEntry, retrying...", {
|
|
1865
|
+
operation: 'updateOneWaitlistEntry',
|
|
1866
|
+
model: 'WaitlistEntry',
|
|
1867
|
+
attempt: retryCount,
|
|
1868
|
+
maxRetries: MAX_RETRIES,
|
|
1869
|
+
recordId: props.id,
|
|
1870
|
+
});
|
|
1781
1871
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1782
1872
|
continue;
|
|
1783
1873
|
}
|
|
1784
|
-
// Log
|
|
1785
|
-
logger_1.logger.error("Database
|
|
1874
|
+
// Log structured error details and rethrow
|
|
1875
|
+
logger_1.logger.error("Database update operation failed", {
|
|
1876
|
+
operation: 'updateOneWaitlistEntry',
|
|
1877
|
+
model: 'WaitlistEntry',
|
|
1878
|
+
error: String(error),
|
|
1879
|
+
recordId: props.id,
|
|
1880
|
+
isRetryable: isConnectionError,
|
|
1881
|
+
});
|
|
1786
1882
|
throw error;
|
|
1787
1883
|
}
|
|
1788
1884
|
}
|
|
@@ -1797,7 +1893,7 @@ exports.WaitlistEntry = {
|
|
|
1797
1893
|
* @returns The updated WaitlistEntry or null.
|
|
1798
1894
|
*/
|
|
1799
1895
|
async upsert(props, globalClient) {
|
|
1800
|
-
var _a, _b, _c, _d, _e;
|
|
1896
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
1801
1897
|
// Maximum number of retries for database connection issues
|
|
1802
1898
|
const MAX_RETRIES = 3;
|
|
1803
1899
|
let retryCount = 0;
|
|
@@ -3195,21 +3291,55 @@ exports.WaitlistEntry = {
|
|
|
3195
3291
|
}
|
|
3196
3292
|
catch (error) {
|
|
3197
3293
|
lastError = error;
|
|
3294
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
3295
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
3296
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
3297
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
3298
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
3299
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
3300
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
3301
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
3302
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
3303
|
+
if (isConstraintViolation) {
|
|
3304
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
3305
|
+
logger_1.logger.error("Non-retryable constraint violation in upsertOneWaitlistEntry", {
|
|
3306
|
+
operation: 'upsertOneWaitlistEntry',
|
|
3307
|
+
model: 'WaitlistEntry',
|
|
3308
|
+
error: String(error),
|
|
3309
|
+
recordId: props.id,
|
|
3310
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
3311
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
3312
|
+
isRetryable: false,
|
|
3313
|
+
});
|
|
3314
|
+
throw error;
|
|
3315
|
+
}
|
|
3198
3316
|
// Check if this is a database connection error that we should retry
|
|
3199
|
-
const isConnectionError = ((
|
|
3200
|
-
((
|
|
3201
|
-
((
|
|
3202
|
-
((
|
|
3203
|
-
(error.networkError && ((
|
|
3317
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
3318
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
3319
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
3320
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
3321
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
3204
3322
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
3205
3323
|
retryCount++;
|
|
3206
3324
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
3207
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
3325
|
+
logger_1.logger.warn("Database connection error in upsertOneWaitlistEntry, retrying...", {
|
|
3326
|
+
operation: 'upsertOneWaitlistEntry',
|
|
3327
|
+
model: 'WaitlistEntry',
|
|
3328
|
+
attempt: retryCount,
|
|
3329
|
+
maxRetries: MAX_RETRIES,
|
|
3330
|
+
recordId: props.id,
|
|
3331
|
+
});
|
|
3208
3332
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
3209
3333
|
continue;
|
|
3210
3334
|
}
|
|
3211
|
-
// Log
|
|
3212
|
-
logger_1.logger.error("Database
|
|
3335
|
+
// Log structured error details and rethrow
|
|
3336
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
3337
|
+
operation: 'upsertOneWaitlistEntry',
|
|
3338
|
+
model: 'WaitlistEntry',
|
|
3339
|
+
error: String(error),
|
|
3340
|
+
recordId: props.id,
|
|
3341
|
+
isRetryable: isConnectionError,
|
|
3342
|
+
});
|
|
3213
3343
|
throw error;
|
|
3214
3344
|
}
|
|
3215
3345
|
}
|
|
@@ -3224,7 +3354,7 @@ exports.WaitlistEntry = {
|
|
|
3224
3354
|
* @returns The count of created records or null.
|
|
3225
3355
|
*/
|
|
3226
3356
|
async updateMany(props, globalClient) {
|
|
3227
|
-
var _a, _b, _c, _d, _e;
|
|
3357
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
3228
3358
|
// Maximum number of retries for database connection issues
|
|
3229
3359
|
const MAX_RETRIES = 3;
|
|
3230
3360
|
let retryCount = 0;
|
|
@@ -4306,21 +4436,52 @@ exports.WaitlistEntry = {
|
|
|
4306
4436
|
}
|
|
4307
4437
|
catch (error) {
|
|
4308
4438
|
lastError = error;
|
|
4439
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
4440
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
4441
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
4442
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
4443
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
4444
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
4445
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
4446
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
4447
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
4448
|
+
if (isConstraintViolation) {
|
|
4449
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
4450
|
+
logger_1.logger.error("Non-retryable constraint violation in updateManyWaitlistEntry", {
|
|
4451
|
+
operation: 'updateManyWaitlistEntry',
|
|
4452
|
+
model: 'WaitlistEntry',
|
|
4453
|
+
error: String(error),
|
|
4454
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
4455
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
4456
|
+
isRetryable: false,
|
|
4457
|
+
});
|
|
4458
|
+
throw error;
|
|
4459
|
+
}
|
|
4309
4460
|
// Check if this is a database connection error that we should retry
|
|
4310
|
-
const isConnectionError = ((
|
|
4311
|
-
((
|
|
4312
|
-
((
|
|
4313
|
-
((
|
|
4314
|
-
(error.networkError && ((
|
|
4461
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
4462
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
4463
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
4464
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
4465
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
4315
4466
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4316
4467
|
retryCount++;
|
|
4317
4468
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4318
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4469
|
+
logger_1.logger.warn("Database connection error in updateManyWaitlistEntry, retrying...", {
|
|
4470
|
+
operation: 'updateManyWaitlistEntry',
|
|
4471
|
+
model: 'WaitlistEntry',
|
|
4472
|
+
attempt: retryCount,
|
|
4473
|
+
maxRetries: MAX_RETRIES,
|
|
4474
|
+
});
|
|
4319
4475
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4320
4476
|
continue;
|
|
4321
4477
|
}
|
|
4322
|
-
// Log
|
|
4323
|
-
logger_1.logger.error("Database
|
|
4478
|
+
// Log structured error details and rethrow
|
|
4479
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
4480
|
+
operation: 'updateManyWaitlistEntry',
|
|
4481
|
+
model: 'WaitlistEntry',
|
|
4482
|
+
error: String(error),
|
|
4483
|
+
isRetryable: isConnectionError,
|
|
4484
|
+
});
|
|
4324
4485
|
throw error;
|
|
4325
4486
|
}
|
|
4326
4487
|
}
|
|
@@ -4335,7 +4496,7 @@ exports.WaitlistEntry = {
|
|
|
4335
4496
|
* @returns The deleted WaitlistEntry or null.
|
|
4336
4497
|
*/
|
|
4337
4498
|
async delete(props, globalClient) {
|
|
4338
|
-
var _a, _b, _c, _d, _e;
|
|
4499
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
4339
4500
|
// Maximum number of retries for database connection issues
|
|
4340
4501
|
const MAX_RETRIES = 3;
|
|
4341
4502
|
let retryCount = 0;
|
|
@@ -4379,21 +4540,58 @@ exports.WaitlistEntry = {
|
|
|
4379
4540
|
}
|
|
4380
4541
|
catch (error) {
|
|
4381
4542
|
lastError = error;
|
|
4543
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
4544
|
+
// (e.g., foreign key constraints preventing deletion)
|
|
4545
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
4546
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
4547
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
4548
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
4549
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
4550
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
4551
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('23503')) ||
|
|
4552
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2002')) ||
|
|
4553
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('P2003')) ||
|
|
4554
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('P2014'));
|
|
4555
|
+
if (isConstraintViolation) {
|
|
4556
|
+
const constraintMatch = (_l = error.message) === null || _l === void 0 ? void 0 : _l.match(/constraint\s+"([^"]+)"/);
|
|
4557
|
+
logger_1.logger.error("Non-retryable constraint violation in deleteOneWaitlistEntry", {
|
|
4558
|
+
operation: 'deleteOneWaitlistEntry',
|
|
4559
|
+
model: 'WaitlistEntry',
|
|
4560
|
+
error: String(error),
|
|
4561
|
+
recordId: props.id,
|
|
4562
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
4563
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
4564
|
+
isRetryable: false,
|
|
4565
|
+
});
|
|
4566
|
+
throw error;
|
|
4567
|
+
}
|
|
4382
4568
|
// Check if this is a database connection error that we should retry
|
|
4383
|
-
const isConnectionError = ((
|
|
4384
|
-
((
|
|
4385
|
-
((
|
|
4386
|
-
((
|
|
4387
|
-
(error.networkError && ((
|
|
4569
|
+
const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
|
|
4570
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
|
|
4571
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
|
|
4572
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
4573
|
+
(error.networkError && ((_r = error.networkError.message) === null || _r === void 0 ? void 0 : _r.includes('Failed to fetch')));
|
|
4388
4574
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4389
4575
|
retryCount++;
|
|
4390
4576
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4391
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4577
|
+
logger_1.logger.warn("Database connection error in deleteOneWaitlistEntry, retrying...", {
|
|
4578
|
+
operation: 'deleteOneWaitlistEntry',
|
|
4579
|
+
model: 'WaitlistEntry',
|
|
4580
|
+
attempt: retryCount,
|
|
4581
|
+
maxRetries: MAX_RETRIES,
|
|
4582
|
+
recordId: props.id,
|
|
4583
|
+
});
|
|
4392
4584
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4393
4585
|
continue;
|
|
4394
4586
|
}
|
|
4395
|
-
// Log
|
|
4396
|
-
logger_1.logger.error("Database
|
|
4587
|
+
// Log structured error details and rethrow
|
|
4588
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
4589
|
+
operation: 'deleteOneWaitlistEntry',
|
|
4590
|
+
model: 'WaitlistEntry',
|
|
4591
|
+
error: String(error),
|
|
4592
|
+
recordId: props.id,
|
|
4593
|
+
isRetryable: isConnectionError,
|
|
4594
|
+
});
|
|
4397
4595
|
throw error;
|
|
4398
4596
|
}
|
|
4399
4597
|
}
|
|
@@ -4461,12 +4659,22 @@ exports.WaitlistEntry = {
|
|
|
4461
4659
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4462
4660
|
retryCount++;
|
|
4463
4661
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4464
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4662
|
+
logger_1.logger.warn("Database connection error in getWaitlistEntry, retrying...", {
|
|
4663
|
+
operation: 'getWaitlistEntry',
|
|
4664
|
+
model: 'WaitlistEntry',
|
|
4665
|
+
attempt: retryCount,
|
|
4666
|
+
maxRetries: MAX_RETRIES,
|
|
4667
|
+
});
|
|
4465
4668
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4466
4669
|
continue;
|
|
4467
4670
|
}
|
|
4468
|
-
// Log
|
|
4469
|
-
logger_1.logger.error("Database
|
|
4671
|
+
// Log structured error details and rethrow
|
|
4672
|
+
logger_1.logger.error("Database get operation failed", {
|
|
4673
|
+
operation: 'getWaitlistEntry',
|
|
4674
|
+
model: 'WaitlistEntry',
|
|
4675
|
+
error: String(error),
|
|
4676
|
+
isRetryable: isConnectionError,
|
|
4677
|
+
});
|
|
4470
4678
|
throw error;
|
|
4471
4679
|
}
|
|
4472
4680
|
}
|
|
@@ -4524,12 +4732,22 @@ exports.WaitlistEntry = {
|
|
|
4524
4732
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4525
4733
|
retryCount++;
|
|
4526
4734
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4527
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4735
|
+
logger_1.logger.warn("Database connection error in getAllWaitlistEntry, retrying...", {
|
|
4736
|
+
operation: 'getAllWaitlistEntry',
|
|
4737
|
+
model: 'WaitlistEntry',
|
|
4738
|
+
attempt: retryCount,
|
|
4739
|
+
maxRetries: MAX_RETRIES,
|
|
4740
|
+
});
|
|
4528
4741
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4529
4742
|
continue;
|
|
4530
4743
|
}
|
|
4531
|
-
// Log
|
|
4532
|
-
logger_1.logger.error("Database
|
|
4744
|
+
// Log structured error details and rethrow
|
|
4745
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
4746
|
+
operation: 'getAllWaitlistEntry',
|
|
4747
|
+
model: 'WaitlistEntry',
|
|
4748
|
+
error: String(error),
|
|
4749
|
+
isRetryable: isConnectionError,
|
|
4750
|
+
});
|
|
4533
4751
|
throw error;
|
|
4534
4752
|
}
|
|
4535
4753
|
}
|
|
@@ -4606,12 +4824,22 @@ exports.WaitlistEntry = {
|
|
|
4606
4824
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4607
4825
|
retryCount++;
|
|
4608
4826
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
4609
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
4827
|
+
logger_1.logger.warn("Database connection error in findManyWaitlistEntry, retrying...", {
|
|
4828
|
+
operation: 'findManyWaitlistEntry',
|
|
4829
|
+
model: 'WaitlistEntry',
|
|
4830
|
+
attempt: retryCount,
|
|
4831
|
+
maxRetries: MAX_RETRIES,
|
|
4832
|
+
});
|
|
4610
4833
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
4611
4834
|
continue;
|
|
4612
4835
|
}
|
|
4613
|
-
// Log
|
|
4614
|
-
logger_1.logger.error("Database
|
|
4836
|
+
// Log structured error details and rethrow
|
|
4837
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
4838
|
+
operation: 'findManyWaitlistEntry',
|
|
4839
|
+
model: 'WaitlistEntry',
|
|
4840
|
+
error: String(error),
|
|
4841
|
+
isRetryable: isConnectionError,
|
|
4842
|
+
});
|
|
4615
4843
|
throw error;
|
|
4616
4844
|
}
|
|
4617
4845
|
}
|
package/esm/ABTest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ABTest.d.ts","sourceRoot":"","sources":["../../src/ABTest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAA4B,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAoO7G,eAAO,MAAM,MAAM;IAEjB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ABTest.d.ts","sourceRoot":"","sources":["../../src/ABTest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAA4B,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAoO7G,eAAO,MAAM,MAAM;IAEjB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IA6+C9G;;;;;;OAMG;sBACqB,UAAU,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAqIhI;;;;;;OAMG;kBACiB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAgmM5G;;;;;;OAMG;kBACiB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAw9O5G;;;;;;OAMG;sBACqB,UAAU,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IA+lMhI;;;;;;OAMG;kBACiB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAmH5G;;;;;;;OAOG;eACc,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,GAAG,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IA6FlI;;;;;OAKG;0BACyB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;IA4ElG;;;;;;;OAOG;oBACmB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,GAAG,GAAG,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;CAmG1I,CAAC"}
|