@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/ModelArtifact.cjs
CHANGED
|
@@ -185,7 +185,7 @@ exports.ModelArtifact = {
|
|
|
185
185
|
* @returns The created ModelArtifact or null.
|
|
186
186
|
*/
|
|
187
187
|
async create(props, globalClient) {
|
|
188
|
-
var _a, _b, _c, _d, _e;
|
|
188
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
189
189
|
// Maximum number of retries for database connection issues
|
|
190
190
|
const MAX_RETRIES = 3;
|
|
191
191
|
let retryCount = 0;
|
|
@@ -526,21 +526,52 @@ exports.ModelArtifact = {
|
|
|
526
526
|
}
|
|
527
527
|
catch (error) {
|
|
528
528
|
lastError = error;
|
|
529
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
530
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
531
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
532
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
533
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
534
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
535
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
536
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
537
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
538
|
+
if (isConstraintViolation) {
|
|
539
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
540
|
+
logger_1.logger.error("Non-retryable constraint violation in createOneModelArtifact", {
|
|
541
|
+
operation: 'createOneModelArtifact',
|
|
542
|
+
model: 'ModelArtifact',
|
|
543
|
+
error: String(error),
|
|
544
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
545
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
546
|
+
isRetryable: false,
|
|
547
|
+
});
|
|
548
|
+
throw error;
|
|
549
|
+
}
|
|
529
550
|
// Check if this is a database connection error that we should retry
|
|
530
|
-
const isConnectionError = ((
|
|
531
|
-
((
|
|
532
|
-
((
|
|
533
|
-
((
|
|
534
|
-
(error.networkError && ((
|
|
551
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
552
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
553
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
554
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
555
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
535
556
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
536
557
|
retryCount++;
|
|
537
558
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
538
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
559
|
+
logger_1.logger.warn("Database connection error in createOneModelArtifact, retrying...", {
|
|
560
|
+
operation: 'createOneModelArtifact',
|
|
561
|
+
model: 'ModelArtifact',
|
|
562
|
+
attempt: retryCount,
|
|
563
|
+
maxRetries: MAX_RETRIES,
|
|
564
|
+
});
|
|
539
565
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
540
566
|
continue;
|
|
541
567
|
}
|
|
542
|
-
// Log
|
|
543
|
-
logger_1.logger.error("Database
|
|
568
|
+
// Log structured error details and rethrow
|
|
569
|
+
logger_1.logger.error("Database create operation failed", {
|
|
570
|
+
operation: 'createOneModelArtifact',
|
|
571
|
+
model: 'ModelArtifact',
|
|
572
|
+
error: String(error),
|
|
573
|
+
isRetryable: isConnectionError,
|
|
574
|
+
});
|
|
544
575
|
throw error;
|
|
545
576
|
}
|
|
546
577
|
}
|
|
@@ -555,7 +586,7 @@ exports.ModelArtifact = {
|
|
|
555
586
|
* @returns The count of created records or null.
|
|
556
587
|
*/
|
|
557
588
|
async createMany(props, globalClient) {
|
|
558
|
-
var _a, _b, _c, _d, _e;
|
|
589
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
559
590
|
// Maximum number of retries for database connection issues
|
|
560
591
|
const MAX_RETRIES = 3;
|
|
561
592
|
let retryCount = 0;
|
|
@@ -611,21 +642,52 @@ exports.ModelArtifact = {
|
|
|
611
642
|
}
|
|
612
643
|
catch (error) {
|
|
613
644
|
lastError = error;
|
|
645
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
646
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
647
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
648
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
649
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
650
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
651
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
652
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
653
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
654
|
+
if (isConstraintViolation) {
|
|
655
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
656
|
+
logger_1.logger.error("Non-retryable constraint violation in createManyModelArtifact", {
|
|
657
|
+
operation: 'createManyModelArtifact',
|
|
658
|
+
model: 'ModelArtifact',
|
|
659
|
+
error: String(error),
|
|
660
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
661
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
662
|
+
isRetryable: false,
|
|
663
|
+
});
|
|
664
|
+
throw error;
|
|
665
|
+
}
|
|
614
666
|
// Check if this is a database connection error that we should retry
|
|
615
|
-
const isConnectionError = ((
|
|
616
|
-
((
|
|
617
|
-
((
|
|
618
|
-
((
|
|
619
|
-
(error.networkError && ((
|
|
667
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
668
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
669
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
670
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
671
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
620
672
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
621
673
|
retryCount++;
|
|
622
674
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
623
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
675
|
+
logger_1.logger.warn("Database connection error in createManyModelArtifact, retrying...", {
|
|
676
|
+
operation: 'createManyModelArtifact',
|
|
677
|
+
model: 'ModelArtifact',
|
|
678
|
+
attempt: retryCount,
|
|
679
|
+
maxRetries: MAX_RETRIES,
|
|
680
|
+
});
|
|
624
681
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
625
682
|
continue;
|
|
626
683
|
}
|
|
627
|
-
// Log
|
|
628
|
-
logger_1.logger.error("Database
|
|
684
|
+
// Log structured error details and rethrow
|
|
685
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
686
|
+
operation: 'createManyModelArtifact',
|
|
687
|
+
model: 'ModelArtifact',
|
|
688
|
+
error: String(error),
|
|
689
|
+
isRetryable: isConnectionError,
|
|
690
|
+
});
|
|
629
691
|
throw error;
|
|
630
692
|
}
|
|
631
693
|
}
|
|
@@ -640,7 +702,7 @@ exports.ModelArtifact = {
|
|
|
640
702
|
* @returns The updated ModelArtifact or null.
|
|
641
703
|
*/
|
|
642
704
|
async update(props, globalClient) {
|
|
643
|
-
var _a, _b, _c, _d, _e;
|
|
705
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
644
706
|
// Maximum number of retries for database connection issues
|
|
645
707
|
const MAX_RETRIES = 3;
|
|
646
708
|
let retryCount = 0;
|
|
@@ -2028,21 +2090,55 @@ exports.ModelArtifact = {
|
|
|
2028
2090
|
}
|
|
2029
2091
|
catch (error) {
|
|
2030
2092
|
lastError = error;
|
|
2093
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
2094
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
2095
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
2096
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
2097
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
2098
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
2099
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
2100
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
2101
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
2102
|
+
if (isConstraintViolation) {
|
|
2103
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
2104
|
+
logger_1.logger.error("Non-retryable constraint violation in updateOneModelArtifact", {
|
|
2105
|
+
operation: 'updateOneModelArtifact',
|
|
2106
|
+
model: 'ModelArtifact',
|
|
2107
|
+
error: String(error),
|
|
2108
|
+
recordId: props.id,
|
|
2109
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
2110
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
2111
|
+
isRetryable: false,
|
|
2112
|
+
});
|
|
2113
|
+
throw error;
|
|
2114
|
+
}
|
|
2031
2115
|
// Check if this is a database connection error that we should retry
|
|
2032
|
-
const isConnectionError = ((
|
|
2033
|
-
((
|
|
2034
|
-
((
|
|
2035
|
-
((
|
|
2036
|
-
(error.networkError && ((
|
|
2116
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
2117
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
2118
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
2119
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
2120
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
2037
2121
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
2038
2122
|
retryCount++;
|
|
2039
2123
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
2040
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
2124
|
+
logger_1.logger.warn("Database connection error in updateOneModelArtifact, retrying...", {
|
|
2125
|
+
operation: 'updateOneModelArtifact',
|
|
2126
|
+
model: 'ModelArtifact',
|
|
2127
|
+
attempt: retryCount,
|
|
2128
|
+
maxRetries: MAX_RETRIES,
|
|
2129
|
+
recordId: props.id,
|
|
2130
|
+
});
|
|
2041
2131
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
2042
2132
|
continue;
|
|
2043
2133
|
}
|
|
2044
|
-
// Log
|
|
2045
|
-
logger_1.logger.error("Database
|
|
2134
|
+
// Log structured error details and rethrow
|
|
2135
|
+
logger_1.logger.error("Database update operation failed", {
|
|
2136
|
+
operation: 'updateOneModelArtifact',
|
|
2137
|
+
model: 'ModelArtifact',
|
|
2138
|
+
error: String(error),
|
|
2139
|
+
recordId: props.id,
|
|
2140
|
+
isRetryable: isConnectionError,
|
|
2141
|
+
});
|
|
2046
2142
|
throw error;
|
|
2047
2143
|
}
|
|
2048
2144
|
}
|
|
@@ -2057,7 +2153,7 @@ exports.ModelArtifact = {
|
|
|
2057
2153
|
* @returns The updated ModelArtifact or null.
|
|
2058
2154
|
*/
|
|
2059
2155
|
async upsert(props, globalClient) {
|
|
2060
|
-
var _a, _b, _c, _d, _e;
|
|
2156
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
2061
2157
|
// Maximum number of retries for database connection issues
|
|
2062
2158
|
const MAX_RETRIES = 3;
|
|
2063
2159
|
let retryCount = 0;
|
|
@@ -3735,21 +3831,55 @@ exports.ModelArtifact = {
|
|
|
3735
3831
|
}
|
|
3736
3832
|
catch (error) {
|
|
3737
3833
|
lastError = error;
|
|
3834
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
3835
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
3836
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
3837
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
3838
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
3839
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
3840
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
3841
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
3842
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
3843
|
+
if (isConstraintViolation) {
|
|
3844
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
3845
|
+
logger_1.logger.error("Non-retryable constraint violation in upsertOneModelArtifact", {
|
|
3846
|
+
operation: 'upsertOneModelArtifact',
|
|
3847
|
+
model: 'ModelArtifact',
|
|
3848
|
+
error: String(error),
|
|
3849
|
+
recordId: props.id,
|
|
3850
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
3851
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
3852
|
+
isRetryable: false,
|
|
3853
|
+
});
|
|
3854
|
+
throw error;
|
|
3855
|
+
}
|
|
3738
3856
|
// Check if this is a database connection error that we should retry
|
|
3739
|
-
const isConnectionError = ((
|
|
3740
|
-
((
|
|
3741
|
-
((
|
|
3742
|
-
((
|
|
3743
|
-
(error.networkError && ((
|
|
3857
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
3858
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
3859
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
3860
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
3861
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
3744
3862
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
3745
3863
|
retryCount++;
|
|
3746
3864
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
3747
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
3865
|
+
logger_1.logger.warn("Database connection error in upsertOneModelArtifact, retrying...", {
|
|
3866
|
+
operation: 'upsertOneModelArtifact',
|
|
3867
|
+
model: 'ModelArtifact',
|
|
3868
|
+
attempt: retryCount,
|
|
3869
|
+
maxRetries: MAX_RETRIES,
|
|
3870
|
+
recordId: props.id,
|
|
3871
|
+
});
|
|
3748
3872
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
3749
3873
|
continue;
|
|
3750
3874
|
}
|
|
3751
|
-
// Log
|
|
3752
|
-
logger_1.logger.error("Database
|
|
3875
|
+
// Log structured error details and rethrow
|
|
3876
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
3877
|
+
operation: 'upsertOneModelArtifact',
|
|
3878
|
+
model: 'ModelArtifact',
|
|
3879
|
+
error: String(error),
|
|
3880
|
+
recordId: props.id,
|
|
3881
|
+
isRetryable: isConnectionError,
|
|
3882
|
+
});
|
|
3753
3883
|
throw error;
|
|
3754
3884
|
}
|
|
3755
3885
|
}
|
|
@@ -3764,7 +3894,7 @@ exports.ModelArtifact = {
|
|
|
3764
3894
|
* @returns The count of created records or null.
|
|
3765
3895
|
*/
|
|
3766
3896
|
async updateMany(props, globalClient) {
|
|
3767
|
-
var _a, _b, _c, _d, _e;
|
|
3897
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
3768
3898
|
// Maximum number of retries for database connection issues
|
|
3769
3899
|
const MAX_RETRIES = 3;
|
|
3770
3900
|
let retryCount = 0;
|
|
@@ -5152,21 +5282,52 @@ exports.ModelArtifact = {
|
|
|
5152
5282
|
}
|
|
5153
5283
|
catch (error) {
|
|
5154
5284
|
lastError = error;
|
|
5285
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
5286
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
5287
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
5288
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
5289
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
5290
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
5291
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
5292
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
|
|
5293
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
5294
|
+
if (isConstraintViolation) {
|
|
5295
|
+
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
5296
|
+
logger_1.logger.error("Non-retryable constraint violation in updateManyModelArtifact", {
|
|
5297
|
+
operation: 'updateManyModelArtifact',
|
|
5298
|
+
model: 'ModelArtifact',
|
|
5299
|
+
error: String(error),
|
|
5300
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
5301
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
5302
|
+
isRetryable: false,
|
|
5303
|
+
});
|
|
5304
|
+
throw error;
|
|
5305
|
+
}
|
|
5155
5306
|
// Check if this is a database connection error that we should retry
|
|
5156
|
-
const isConnectionError = ((
|
|
5157
|
-
((
|
|
5158
|
-
((
|
|
5159
|
-
((
|
|
5160
|
-
(error.networkError && ((
|
|
5307
|
+
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
5308
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
5309
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
5310
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
5311
|
+
(error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
|
|
5161
5312
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
5162
5313
|
retryCount++;
|
|
5163
5314
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
5164
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
5315
|
+
logger_1.logger.warn("Database connection error in updateManyModelArtifact, retrying...", {
|
|
5316
|
+
operation: 'updateManyModelArtifact',
|
|
5317
|
+
model: 'ModelArtifact',
|
|
5318
|
+
attempt: retryCount,
|
|
5319
|
+
maxRetries: MAX_RETRIES,
|
|
5320
|
+
});
|
|
5165
5321
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
5166
5322
|
continue;
|
|
5167
5323
|
}
|
|
5168
|
-
// Log
|
|
5169
|
-
logger_1.logger.error("Database
|
|
5324
|
+
// Log structured error details and rethrow
|
|
5325
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
5326
|
+
operation: 'updateManyModelArtifact',
|
|
5327
|
+
model: 'ModelArtifact',
|
|
5328
|
+
error: String(error),
|
|
5329
|
+
isRetryable: isConnectionError,
|
|
5330
|
+
});
|
|
5170
5331
|
throw error;
|
|
5171
5332
|
}
|
|
5172
5333
|
}
|
|
@@ -5181,7 +5342,7 @@ exports.ModelArtifact = {
|
|
|
5181
5342
|
* @returns The deleted ModelArtifact or null.
|
|
5182
5343
|
*/
|
|
5183
5344
|
async delete(props, globalClient) {
|
|
5184
|
-
var _a, _b, _c, _d, _e;
|
|
5345
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
5185
5346
|
// Maximum number of retries for database connection issues
|
|
5186
5347
|
const MAX_RETRIES = 3;
|
|
5187
5348
|
let retryCount = 0;
|
|
@@ -5225,21 +5386,58 @@ exports.ModelArtifact = {
|
|
|
5225
5386
|
}
|
|
5226
5387
|
catch (error) {
|
|
5227
5388
|
lastError = error;
|
|
5389
|
+
// Check for constraint violations FIRST - these are NEVER retryable
|
|
5390
|
+
// (e.g., foreign key constraints preventing deletion)
|
|
5391
|
+
const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
|
|
5392
|
+
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
|
|
5393
|
+
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
|
|
5394
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
|
|
5395
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
|
|
5396
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
|
|
5397
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('23503')) ||
|
|
5398
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2002')) ||
|
|
5399
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('P2003')) ||
|
|
5400
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('P2014'));
|
|
5401
|
+
if (isConstraintViolation) {
|
|
5402
|
+
const constraintMatch = (_l = error.message) === null || _l === void 0 ? void 0 : _l.match(/constraint\s+"([^"]+)"/);
|
|
5403
|
+
logger_1.logger.error("Non-retryable constraint violation in deleteOneModelArtifact", {
|
|
5404
|
+
operation: 'deleteOneModelArtifact',
|
|
5405
|
+
model: 'ModelArtifact',
|
|
5406
|
+
error: String(error),
|
|
5407
|
+
recordId: props.id,
|
|
5408
|
+
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
5409
|
+
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
5410
|
+
isRetryable: false,
|
|
5411
|
+
});
|
|
5412
|
+
throw error;
|
|
5413
|
+
}
|
|
5228
5414
|
// Check if this is a database connection error that we should retry
|
|
5229
|
-
const isConnectionError = ((
|
|
5230
|
-
((
|
|
5231
|
-
((
|
|
5232
|
-
((
|
|
5233
|
-
(error.networkError && ((
|
|
5415
|
+
const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
|
|
5416
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
|
|
5417
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
|
|
5418
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
5419
|
+
(error.networkError && ((_r = error.networkError.message) === null || _r === void 0 ? void 0 : _r.includes('Failed to fetch')));
|
|
5234
5420
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
5235
5421
|
retryCount++;
|
|
5236
5422
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
5237
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
5423
|
+
logger_1.logger.warn("Database connection error in deleteOneModelArtifact, retrying...", {
|
|
5424
|
+
operation: 'deleteOneModelArtifact',
|
|
5425
|
+
model: 'ModelArtifact',
|
|
5426
|
+
attempt: retryCount,
|
|
5427
|
+
maxRetries: MAX_RETRIES,
|
|
5428
|
+
recordId: props.id,
|
|
5429
|
+
});
|
|
5238
5430
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
5239
5431
|
continue;
|
|
5240
5432
|
}
|
|
5241
|
-
// Log
|
|
5242
|
-
logger_1.logger.error("Database
|
|
5433
|
+
// Log structured error details and rethrow
|
|
5434
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
5435
|
+
operation: 'deleteOneModelArtifact',
|
|
5436
|
+
model: 'ModelArtifact',
|
|
5437
|
+
error: String(error),
|
|
5438
|
+
recordId: props.id,
|
|
5439
|
+
isRetryable: isConnectionError,
|
|
5440
|
+
});
|
|
5243
5441
|
throw error;
|
|
5244
5442
|
}
|
|
5245
5443
|
}
|
|
@@ -5306,12 +5504,22 @@ exports.ModelArtifact = {
|
|
|
5306
5504
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
5307
5505
|
retryCount++;
|
|
5308
5506
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
5309
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
5507
|
+
logger_1.logger.warn("Database connection error in getModelArtifact, retrying...", {
|
|
5508
|
+
operation: 'getModelArtifact',
|
|
5509
|
+
model: 'ModelArtifact',
|
|
5510
|
+
attempt: retryCount,
|
|
5511
|
+
maxRetries: MAX_RETRIES,
|
|
5512
|
+
});
|
|
5310
5513
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
5311
5514
|
continue;
|
|
5312
5515
|
}
|
|
5313
|
-
// Log
|
|
5314
|
-
logger_1.logger.error("Database
|
|
5516
|
+
// Log structured error details and rethrow
|
|
5517
|
+
logger_1.logger.error("Database get operation failed", {
|
|
5518
|
+
operation: 'getModelArtifact',
|
|
5519
|
+
model: 'ModelArtifact',
|
|
5520
|
+
error: String(error),
|
|
5521
|
+
isRetryable: isConnectionError,
|
|
5522
|
+
});
|
|
5315
5523
|
throw error;
|
|
5316
5524
|
}
|
|
5317
5525
|
}
|
|
@@ -5369,12 +5577,22 @@ exports.ModelArtifact = {
|
|
|
5369
5577
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
5370
5578
|
retryCount++;
|
|
5371
5579
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
5372
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
5580
|
+
logger_1.logger.warn("Database connection error in getAllModelArtifact, retrying...", {
|
|
5581
|
+
operation: 'getAllModelArtifact',
|
|
5582
|
+
model: 'ModelArtifact',
|
|
5583
|
+
attempt: retryCount,
|
|
5584
|
+
maxRetries: MAX_RETRIES,
|
|
5585
|
+
});
|
|
5373
5586
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
5374
5587
|
continue;
|
|
5375
5588
|
}
|
|
5376
|
-
// Log
|
|
5377
|
-
logger_1.logger.error("Database
|
|
5589
|
+
// Log structured error details and rethrow
|
|
5590
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
5591
|
+
operation: 'getAllModelArtifact',
|
|
5592
|
+
model: 'ModelArtifact',
|
|
5593
|
+
error: String(error),
|
|
5594
|
+
isRetryable: isConnectionError,
|
|
5595
|
+
});
|
|
5378
5596
|
throw error;
|
|
5379
5597
|
}
|
|
5380
5598
|
}
|
|
@@ -5448,12 +5666,22 @@ exports.ModelArtifact = {
|
|
|
5448
5666
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
5449
5667
|
retryCount++;
|
|
5450
5668
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
5451
|
-
logger_1.logger.warn("Database connection error, retrying..."
|
|
5669
|
+
logger_1.logger.warn("Database connection error in findManyModelArtifact, retrying...", {
|
|
5670
|
+
operation: 'findManyModelArtifact',
|
|
5671
|
+
model: 'ModelArtifact',
|
|
5672
|
+
attempt: retryCount,
|
|
5673
|
+
maxRetries: MAX_RETRIES,
|
|
5674
|
+
});
|
|
5452
5675
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
5453
5676
|
continue;
|
|
5454
5677
|
}
|
|
5455
|
-
// Log
|
|
5456
|
-
logger_1.logger.error("Database
|
|
5678
|
+
// Log structured error details and rethrow
|
|
5679
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
5680
|
+
operation: 'findManyModelArtifact',
|
|
5681
|
+
model: 'ModelArtifact',
|
|
5682
|
+
error: String(error),
|
|
5683
|
+
isRetryable: isConnectionError,
|
|
5684
|
+
});
|
|
5457
5685
|
throw error;
|
|
5458
5686
|
}
|
|
5459
5687
|
}
|