@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.
Files changed (229) hide show
  1. package/ABTest.cjs +291 -63
  2. package/Account.cjs +291 -63
  3. package/AccountLinkingRequest.cjs +291 -63
  4. package/Action.cjs +291 -63
  5. package/Alert.cjs +291 -63
  6. package/Allocation.cjs +291 -63
  7. package/AlpacaAccount.cjs +291 -63
  8. package/AnalyticsConfiguration.cjs +291 -63
  9. package/AnalyticsSnapshot.cjs +291 -63
  10. package/Asset.cjs +291 -63
  11. package/AuditLog.cjs +291 -63
  12. package/Authenticator.cjs +291 -63
  13. package/Configuration.cjs +291 -63
  14. package/ConflictEvent.cjs +291 -63
  15. package/ConnectionHealthSnapshot.cjs +291 -63
  16. package/Customer.cjs +291 -63
  17. package/DeadLetterMessage.cjs +291 -63
  18. package/EconomicEvent.cjs +291 -63
  19. package/Event.cjs +291 -63
  20. package/EventSnapshot.cjs +291 -63
  21. package/FeatureImportanceAnalysis.cjs +291 -63
  22. package/InstitutionalFlowSignal.cjs +291 -63
  23. package/InstitutionalHolding.cjs +291 -63
  24. package/InstitutionalSentimentAlerts.cjs +291 -63
  25. package/InstitutionalSentimentErrors.cjs +291 -63
  26. package/InstitutionalSentimentHistory.cjs +291 -63
  27. package/InstitutionalSentimentMetrics.cjs +291 -63
  28. package/InviteToken.cjs +291 -63
  29. package/LinkedProvider.cjs +291 -63
  30. package/MLTrainingData.cjs +291 -63
  31. package/MarketSentiment.cjs +291 -63
  32. package/ModelArtifact.cjs +291 -63
  33. package/ModelVersion.cjs +291 -63
  34. package/ModelVersionArtifact.cjs +291 -63
  35. package/NewsArticle.cjs +291 -63
  36. package/NewsArticleAssetSentiment.cjs +291 -63
  37. package/OptionsContract.cjs +291 -63
  38. package/OptionsGreeksHistory.cjs +291 -63
  39. package/OptionsPosition.cjs +291 -63
  40. package/OptionsTradeExecution.cjs +291 -63
  41. package/PortfolioGreeksHistory.cjs +291 -63
  42. package/ScheduledOptionOrder.cjs +291 -63
  43. package/Session.cjs +291 -63
  44. package/SignalGeneratorMetrics.cjs +291 -63
  45. package/SignalLineage.cjs +291 -63
  46. package/SignalOutcome.cjs +291 -63
  47. package/SignalPriorityQueue.cjs +291 -63
  48. package/SyncEvent.cjs +291 -63
  49. package/SystemAlert.cjs +291 -63
  50. package/Trade.cjs +291 -63
  51. package/TradeAuditEvent.cjs +291 -63
  52. package/TradeExecutionHistory.cjs +291 -63
  53. package/User.cjs +291 -63
  54. package/VerificationToken.cjs +291 -63
  55. package/WaitlistEntry.cjs +291 -63
  56. package/esm/ABTest.d.ts.map +1 -1
  57. package/esm/ABTest.js.map +1 -1
  58. package/esm/ABTest.mjs +255 -27
  59. package/esm/Account.d.ts.map +1 -1
  60. package/esm/Account.js.map +1 -1
  61. package/esm/Account.mjs +255 -27
  62. package/esm/AccountLinkingRequest.d.ts.map +1 -1
  63. package/esm/AccountLinkingRequest.js.map +1 -1
  64. package/esm/AccountLinkingRequest.mjs +255 -27
  65. package/esm/Action.d.ts.map +1 -1
  66. package/esm/Action.js.map +1 -1
  67. package/esm/Action.mjs +255 -27
  68. package/esm/Alert.d.ts.map +1 -1
  69. package/esm/Alert.js.map +1 -1
  70. package/esm/Alert.mjs +255 -27
  71. package/esm/Allocation.d.ts.map +1 -1
  72. package/esm/Allocation.js.map +1 -1
  73. package/esm/Allocation.mjs +255 -27
  74. package/esm/AlpacaAccount.d.ts.map +1 -1
  75. package/esm/AlpacaAccount.js.map +1 -1
  76. package/esm/AlpacaAccount.mjs +255 -27
  77. package/esm/AnalyticsConfiguration.d.ts.map +1 -1
  78. package/esm/AnalyticsConfiguration.js.map +1 -1
  79. package/esm/AnalyticsConfiguration.mjs +255 -27
  80. package/esm/AnalyticsSnapshot.d.ts.map +1 -1
  81. package/esm/AnalyticsSnapshot.js.map +1 -1
  82. package/esm/AnalyticsSnapshot.mjs +255 -27
  83. package/esm/Asset.d.ts.map +1 -1
  84. package/esm/Asset.js.map +1 -1
  85. package/esm/Asset.mjs +255 -27
  86. package/esm/AuditLog.d.ts.map +1 -1
  87. package/esm/AuditLog.js.map +1 -1
  88. package/esm/AuditLog.mjs +255 -27
  89. package/esm/Authenticator.d.ts.map +1 -1
  90. package/esm/Authenticator.js.map +1 -1
  91. package/esm/Authenticator.mjs +255 -27
  92. package/esm/Configuration.d.ts.map +1 -1
  93. package/esm/Configuration.js.map +1 -1
  94. package/esm/Configuration.mjs +255 -27
  95. package/esm/ConflictEvent.d.ts.map +1 -1
  96. package/esm/ConflictEvent.js.map +1 -1
  97. package/esm/ConflictEvent.mjs +255 -27
  98. package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
  99. package/esm/ConnectionHealthSnapshot.js.map +1 -1
  100. package/esm/ConnectionHealthSnapshot.mjs +255 -27
  101. package/esm/Customer.d.ts.map +1 -1
  102. package/esm/Customer.js.map +1 -1
  103. package/esm/Customer.mjs +255 -27
  104. package/esm/DeadLetterMessage.d.ts.map +1 -1
  105. package/esm/DeadLetterMessage.js.map +1 -1
  106. package/esm/DeadLetterMessage.mjs +255 -27
  107. package/esm/EconomicEvent.d.ts.map +1 -1
  108. package/esm/EconomicEvent.js.map +1 -1
  109. package/esm/EconomicEvent.mjs +255 -27
  110. package/esm/Event.d.ts.map +1 -1
  111. package/esm/Event.js.map +1 -1
  112. package/esm/Event.mjs +255 -27
  113. package/esm/EventSnapshot.d.ts.map +1 -1
  114. package/esm/EventSnapshot.js.map +1 -1
  115. package/esm/EventSnapshot.mjs +255 -27
  116. package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
  117. package/esm/FeatureImportanceAnalysis.js.map +1 -1
  118. package/esm/FeatureImportanceAnalysis.mjs +255 -27
  119. package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
  120. package/esm/InstitutionalFlowSignal.js.map +1 -1
  121. package/esm/InstitutionalFlowSignal.mjs +255 -27
  122. package/esm/InstitutionalHolding.d.ts.map +1 -1
  123. package/esm/InstitutionalHolding.js.map +1 -1
  124. package/esm/InstitutionalHolding.mjs +255 -27
  125. package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
  126. package/esm/InstitutionalSentimentAlerts.js.map +1 -1
  127. package/esm/InstitutionalSentimentAlerts.mjs +255 -27
  128. package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
  129. package/esm/InstitutionalSentimentErrors.js.map +1 -1
  130. package/esm/InstitutionalSentimentErrors.mjs +255 -27
  131. package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
  132. package/esm/InstitutionalSentimentHistory.js.map +1 -1
  133. package/esm/InstitutionalSentimentHistory.mjs +255 -27
  134. package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
  135. package/esm/InstitutionalSentimentMetrics.js.map +1 -1
  136. package/esm/InstitutionalSentimentMetrics.mjs +255 -27
  137. package/esm/InviteToken.d.ts.map +1 -1
  138. package/esm/InviteToken.js.map +1 -1
  139. package/esm/InviteToken.mjs +255 -27
  140. package/esm/LinkedProvider.d.ts.map +1 -1
  141. package/esm/LinkedProvider.js.map +1 -1
  142. package/esm/LinkedProvider.mjs +255 -27
  143. package/esm/MLTrainingData.d.ts.map +1 -1
  144. package/esm/MLTrainingData.js.map +1 -1
  145. package/esm/MLTrainingData.mjs +255 -27
  146. package/esm/MarketSentiment.d.ts.map +1 -1
  147. package/esm/MarketSentiment.js.map +1 -1
  148. package/esm/MarketSentiment.mjs +255 -27
  149. package/esm/ModelArtifact.d.ts.map +1 -1
  150. package/esm/ModelArtifact.js.map +1 -1
  151. package/esm/ModelArtifact.mjs +255 -27
  152. package/esm/ModelVersion.d.ts.map +1 -1
  153. package/esm/ModelVersion.js.map +1 -1
  154. package/esm/ModelVersion.mjs +255 -27
  155. package/esm/ModelVersionArtifact.d.ts.map +1 -1
  156. package/esm/ModelVersionArtifact.js.map +1 -1
  157. package/esm/ModelVersionArtifact.mjs +255 -27
  158. package/esm/NewsArticle.d.ts.map +1 -1
  159. package/esm/NewsArticle.js.map +1 -1
  160. package/esm/NewsArticle.mjs +255 -27
  161. package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
  162. package/esm/NewsArticleAssetSentiment.js.map +1 -1
  163. package/esm/NewsArticleAssetSentiment.mjs +255 -27
  164. package/esm/OptionsContract.d.ts.map +1 -1
  165. package/esm/OptionsContract.js.map +1 -1
  166. package/esm/OptionsContract.mjs +255 -27
  167. package/esm/OptionsGreeksHistory.d.ts.map +1 -1
  168. package/esm/OptionsGreeksHistory.js.map +1 -1
  169. package/esm/OptionsGreeksHistory.mjs +255 -27
  170. package/esm/OptionsPosition.d.ts.map +1 -1
  171. package/esm/OptionsPosition.js.map +1 -1
  172. package/esm/OptionsPosition.mjs +255 -27
  173. package/esm/OptionsTradeExecution.d.ts.map +1 -1
  174. package/esm/OptionsTradeExecution.js.map +1 -1
  175. package/esm/OptionsTradeExecution.mjs +255 -27
  176. package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
  177. package/esm/PortfolioGreeksHistory.js.map +1 -1
  178. package/esm/PortfolioGreeksHistory.mjs +255 -27
  179. package/esm/ScheduledOptionOrder.d.ts.map +1 -1
  180. package/esm/ScheduledOptionOrder.js.map +1 -1
  181. package/esm/ScheduledOptionOrder.mjs +255 -27
  182. package/esm/Session.d.ts.map +1 -1
  183. package/esm/Session.js.map +1 -1
  184. package/esm/Session.mjs +255 -27
  185. package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
  186. package/esm/SignalGeneratorMetrics.js.map +1 -1
  187. package/esm/SignalGeneratorMetrics.mjs +255 -27
  188. package/esm/SignalLineage.d.ts.map +1 -1
  189. package/esm/SignalLineage.js.map +1 -1
  190. package/esm/SignalLineage.mjs +255 -27
  191. package/esm/SignalOutcome.d.ts.map +1 -1
  192. package/esm/SignalOutcome.js.map +1 -1
  193. package/esm/SignalOutcome.mjs +255 -27
  194. package/esm/SignalPriorityQueue.d.ts.map +1 -1
  195. package/esm/SignalPriorityQueue.js.map +1 -1
  196. package/esm/SignalPriorityQueue.mjs +255 -27
  197. package/esm/SyncEvent.d.ts.map +1 -1
  198. package/esm/SyncEvent.js.map +1 -1
  199. package/esm/SyncEvent.mjs +255 -27
  200. package/esm/SystemAlert.d.ts.map +1 -1
  201. package/esm/SystemAlert.js.map +1 -1
  202. package/esm/SystemAlert.mjs +255 -27
  203. package/esm/Trade.d.ts.map +1 -1
  204. package/esm/Trade.js.map +1 -1
  205. package/esm/Trade.mjs +255 -27
  206. package/esm/TradeAuditEvent.d.ts.map +1 -1
  207. package/esm/TradeAuditEvent.js.map +1 -1
  208. package/esm/TradeAuditEvent.mjs +255 -27
  209. package/esm/TradeExecutionHistory.d.ts.map +1 -1
  210. package/esm/TradeExecutionHistory.js.map +1 -1
  211. package/esm/TradeExecutionHistory.mjs +255 -27
  212. package/esm/User.d.ts.map +1 -1
  213. package/esm/User.js.map +1 -1
  214. package/esm/User.mjs +255 -27
  215. package/esm/VerificationToken.d.ts.map +1 -1
  216. package/esm/VerificationToken.js.map +1 -1
  217. package/esm/VerificationToken.mjs +255 -27
  218. package/esm/WaitlistEntry.d.ts.map +1 -1
  219. package/esm/WaitlistEntry.js.map +1 -1
  220. package/esm/WaitlistEntry.mjs +255 -27
  221. package/esm/middleware/audit-logger.d.ts +0 -7
  222. package/esm/middleware/audit-logger.d.ts.map +1 -1
  223. package/esm/middleware/audit-logger.js.map +1 -1
  224. package/esm/middleware/audit-logger.mjs +5 -3
  225. package/esm/prismaClient.d.ts.map +1 -1
  226. package/esm/prismaClient.js.map +1 -1
  227. package/esm/prismaClient.mjs +38 -9
  228. package/package.json +1 -1
  229. package/prismaClient.cjs +38 -9
@@ -182,7 +182,7 @@ exports.FeatureImportanceAnalysis = {
182
182
  * @returns The created FeatureImportanceAnalysis or null.
183
183
  */
184
184
  async create(props, globalClient) {
185
- var _a, _b, _c, _d, _e;
185
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
186
186
  // Maximum number of retries for database connection issues
187
187
  const MAX_RETRIES = 3;
188
188
  let retryCount = 0;
@@ -992,21 +992,52 @@ exports.FeatureImportanceAnalysis = {
992
992
  }
993
993
  catch (error) {
994
994
  lastError = error;
995
+ // Check for constraint violations FIRST - these are NEVER retryable
996
+ const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
997
+ ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
998
+ ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
999
+ ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
1000
+ ((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
1001
+ ((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
1002
+ ((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
1003
+ ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
1004
+ if (isConstraintViolation) {
1005
+ const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
1006
+ logger_1.logger.error("Non-retryable constraint violation in createOneFeatureImportanceAnalysis", {
1007
+ operation: 'createOneFeatureImportanceAnalysis',
1008
+ model: 'FeatureImportanceAnalysis',
1009
+ error: String(error),
1010
+ constraintName: constraintMatch ? constraintMatch[1] : undefined,
1011
+ errorCategory: 'CONSTRAINT_VIOLATION',
1012
+ isRetryable: false,
1013
+ });
1014
+ throw error;
1015
+ }
995
1016
  // Check if this is a database connection error that we should retry
996
- const isConnectionError = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('Server has closed the connection')) ||
997
- ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('Cannot reach database server')) ||
998
- ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Connection timed out')) ||
999
- ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Accelerate')) || // Prisma Accelerate proxy errors
1000
- (error.networkError && ((_e = error.networkError.message) === null || _e === void 0 ? void 0 : _e.includes('Failed to fetch')));
1017
+ const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
1018
+ ((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
1019
+ ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
1020
+ ((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
1021
+ (error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
1001
1022
  if (isConnectionError && retryCount < MAX_RETRIES - 1) {
1002
1023
  retryCount++;
1003
1024
  const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
1004
- logger_1.logger.warn("Database connection error, retrying...");
1025
+ logger_1.logger.warn("Database connection error in createOneFeatureImportanceAnalysis, retrying...", {
1026
+ operation: 'createOneFeatureImportanceAnalysis',
1027
+ model: 'FeatureImportanceAnalysis',
1028
+ attempt: retryCount,
1029
+ maxRetries: MAX_RETRIES,
1030
+ });
1005
1031
  await new Promise(resolve => setTimeout(resolve, delay));
1006
1032
  continue;
1007
1033
  }
1008
- // Log the error and rethrow
1009
- logger_1.logger.error("Database error occurred", { error: String(error) });
1034
+ // Log structured error details and rethrow
1035
+ logger_1.logger.error("Database create operation failed", {
1036
+ operation: 'createOneFeatureImportanceAnalysis',
1037
+ model: 'FeatureImportanceAnalysis',
1038
+ error: String(error),
1039
+ isRetryable: isConnectionError,
1040
+ });
1010
1041
  throw error;
1011
1042
  }
1012
1043
  }
@@ -1021,7 +1052,7 @@ exports.FeatureImportanceAnalysis = {
1021
1052
  * @returns The count of created records or null.
1022
1053
  */
1023
1054
  async createMany(props, globalClient) {
1024
- var _a, _b, _c, _d, _e;
1055
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1025
1056
  // Maximum number of retries for database connection issues
1026
1057
  const MAX_RETRIES = 3;
1027
1058
  let retryCount = 0;
@@ -1079,21 +1110,52 @@ exports.FeatureImportanceAnalysis = {
1079
1110
  }
1080
1111
  catch (error) {
1081
1112
  lastError = error;
1113
+ // Check for constraint violations FIRST - these are NEVER retryable
1114
+ const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
1115
+ ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
1116
+ ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
1117
+ ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
1118
+ ((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
1119
+ ((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
1120
+ ((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
1121
+ ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
1122
+ if (isConstraintViolation) {
1123
+ const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
1124
+ logger_1.logger.error("Non-retryable constraint violation in createManyFeatureImportanceAnalysis", {
1125
+ operation: 'createManyFeatureImportanceAnalysis',
1126
+ model: 'FeatureImportanceAnalysis',
1127
+ error: String(error),
1128
+ constraintName: constraintMatch ? constraintMatch[1] : undefined,
1129
+ errorCategory: 'CONSTRAINT_VIOLATION',
1130
+ isRetryable: false,
1131
+ });
1132
+ throw error;
1133
+ }
1082
1134
  // Check if this is a database connection error that we should retry
1083
- const isConnectionError = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('Server has closed the connection')) ||
1084
- ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('Cannot reach database server')) ||
1085
- ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Connection timed out')) ||
1086
- ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Accelerate')) || // Prisma Accelerate proxy errors
1087
- (error.networkError && ((_e = error.networkError.message) === null || _e === void 0 ? void 0 : _e.includes('Failed to fetch')));
1135
+ const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
1136
+ ((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
1137
+ ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
1138
+ ((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
1139
+ (error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
1088
1140
  if (isConnectionError && retryCount < MAX_RETRIES - 1) {
1089
1141
  retryCount++;
1090
1142
  const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
1091
- logger_1.logger.warn("Database connection error, retrying...");
1143
+ logger_1.logger.warn("Database connection error in createManyFeatureImportanceAnalysis, retrying...", {
1144
+ operation: 'createManyFeatureImportanceAnalysis',
1145
+ model: 'FeatureImportanceAnalysis',
1146
+ attempt: retryCount,
1147
+ maxRetries: MAX_RETRIES,
1148
+ });
1092
1149
  await new Promise(resolve => setTimeout(resolve, delay));
1093
1150
  continue;
1094
1151
  }
1095
- // Log the error and rethrow
1096
- logger_1.logger.error("Database error occurred", { error: String(error) });
1152
+ // Log structured error details and rethrow
1153
+ logger_1.logger.error("Database createMany operation failed", {
1154
+ operation: 'createManyFeatureImportanceAnalysis',
1155
+ model: 'FeatureImportanceAnalysis',
1156
+ error: String(error),
1157
+ isRetryable: isConnectionError,
1158
+ });
1097
1159
  throw error;
1098
1160
  }
1099
1161
  }
@@ -1108,7 +1170,7 @@ exports.FeatureImportanceAnalysis = {
1108
1170
  * @returns The updated FeatureImportanceAnalysis or null.
1109
1171
  */
1110
1172
  async update(props, globalClient) {
1111
- var _a, _b, _c, _d, _e;
1173
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1112
1174
  // Maximum number of retries for database connection issues
1113
1175
  const MAX_RETRIES = 3;
1114
1176
  let retryCount = 0;
@@ -4530,21 +4592,55 @@ exports.FeatureImportanceAnalysis = {
4530
4592
  }
4531
4593
  catch (error) {
4532
4594
  lastError = error;
4595
+ // Check for constraint violations FIRST - these are NEVER retryable
4596
+ const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
4597
+ ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
4598
+ ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
4599
+ ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
4600
+ ((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
4601
+ ((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
4602
+ ((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
4603
+ ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
4604
+ if (isConstraintViolation) {
4605
+ const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
4606
+ logger_1.logger.error("Non-retryable constraint violation in updateOneFeatureImportanceAnalysis", {
4607
+ operation: 'updateOneFeatureImportanceAnalysis',
4608
+ model: 'FeatureImportanceAnalysis',
4609
+ error: String(error),
4610
+ recordId: props.id,
4611
+ constraintName: constraintMatch ? constraintMatch[1] : undefined,
4612
+ errorCategory: 'CONSTRAINT_VIOLATION',
4613
+ isRetryable: false,
4614
+ });
4615
+ throw error;
4616
+ }
4533
4617
  // Check if this is a database connection error that we should retry
4534
- const isConnectionError = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('Server has closed the connection')) ||
4535
- ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('Cannot reach database server')) ||
4536
- ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Connection timed out')) ||
4537
- ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Accelerate')) || // Prisma Accelerate proxy errors
4538
- (error.networkError && ((_e = error.networkError.message) === null || _e === void 0 ? void 0 : _e.includes('Failed to fetch')));
4618
+ const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
4619
+ ((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
4620
+ ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
4621
+ ((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
4622
+ (error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
4539
4623
  if (isConnectionError && retryCount < MAX_RETRIES - 1) {
4540
4624
  retryCount++;
4541
4625
  const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
4542
- logger_1.logger.warn("Database connection error, retrying...");
4626
+ logger_1.logger.warn("Database connection error in updateOneFeatureImportanceAnalysis, retrying...", {
4627
+ operation: 'updateOneFeatureImportanceAnalysis',
4628
+ model: 'FeatureImportanceAnalysis',
4629
+ attempt: retryCount,
4630
+ maxRetries: MAX_RETRIES,
4631
+ recordId: props.id,
4632
+ });
4543
4633
  await new Promise(resolve => setTimeout(resolve, delay));
4544
4634
  continue;
4545
4635
  }
4546
- // Log the error and rethrow
4547
- logger_1.logger.error("Database error occurred", { error: String(error) });
4636
+ // Log structured error details and rethrow
4637
+ logger_1.logger.error("Database update operation failed", {
4638
+ operation: 'updateOneFeatureImportanceAnalysis',
4639
+ model: 'FeatureImportanceAnalysis',
4640
+ error: String(error),
4641
+ recordId: props.id,
4642
+ isRetryable: isConnectionError,
4643
+ });
4548
4644
  throw error;
4549
4645
  }
4550
4646
  }
@@ -4559,7 +4655,7 @@ exports.FeatureImportanceAnalysis = {
4559
4655
  * @returns The updated FeatureImportanceAnalysis or null.
4560
4656
  */
4561
4657
  async upsert(props, globalClient) {
4562
- var _a, _b, _c, _d, _e;
4658
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
4563
4659
  // Maximum number of retries for database connection issues
4564
4660
  const MAX_RETRIES = 3;
4565
4661
  let retryCount = 0;
@@ -8740,21 +8836,55 @@ exports.FeatureImportanceAnalysis = {
8740
8836
  }
8741
8837
  catch (error) {
8742
8838
  lastError = error;
8839
+ // Check for constraint violations FIRST - these are NEVER retryable
8840
+ const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
8841
+ ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
8842
+ ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
8843
+ ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
8844
+ ((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
8845
+ ((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
8846
+ ((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
8847
+ ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
8848
+ if (isConstraintViolation) {
8849
+ const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
8850
+ logger_1.logger.error("Non-retryable constraint violation in upsertOneFeatureImportanceAnalysis", {
8851
+ operation: 'upsertOneFeatureImportanceAnalysis',
8852
+ model: 'FeatureImportanceAnalysis',
8853
+ error: String(error),
8854
+ recordId: props.id,
8855
+ constraintName: constraintMatch ? constraintMatch[1] : undefined,
8856
+ errorCategory: 'CONSTRAINT_VIOLATION',
8857
+ isRetryable: false,
8858
+ });
8859
+ throw error;
8860
+ }
8743
8861
  // Check if this is a database connection error that we should retry
8744
- const isConnectionError = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('Server has closed the connection')) ||
8745
- ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('Cannot reach database server')) ||
8746
- ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Connection timed out')) ||
8747
- ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Accelerate')) || // Prisma Accelerate proxy errors
8748
- (error.networkError && ((_e = error.networkError.message) === null || _e === void 0 ? void 0 : _e.includes('Failed to fetch')));
8862
+ const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
8863
+ ((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
8864
+ ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
8865
+ ((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
8866
+ (error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
8749
8867
  if (isConnectionError && retryCount < MAX_RETRIES - 1) {
8750
8868
  retryCount++;
8751
8869
  const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
8752
- logger_1.logger.warn("Database connection error, retrying...");
8870
+ logger_1.logger.warn("Database connection error in upsertOneFeatureImportanceAnalysis, retrying...", {
8871
+ operation: 'upsertOneFeatureImportanceAnalysis',
8872
+ model: 'FeatureImportanceAnalysis',
8873
+ attempt: retryCount,
8874
+ maxRetries: MAX_RETRIES,
8875
+ recordId: props.id,
8876
+ });
8753
8877
  await new Promise(resolve => setTimeout(resolve, delay));
8754
8878
  continue;
8755
8879
  }
8756
- // Log the error and rethrow
8757
- logger_1.logger.error("Database error occurred", { error: String(error) });
8880
+ // Log structured error details and rethrow
8881
+ logger_1.logger.error("Database upsert operation failed", {
8882
+ operation: 'upsertOneFeatureImportanceAnalysis',
8883
+ model: 'FeatureImportanceAnalysis',
8884
+ error: String(error),
8885
+ recordId: props.id,
8886
+ isRetryable: isConnectionError,
8887
+ });
8758
8888
  throw error;
8759
8889
  }
8760
8890
  }
@@ -8769,7 +8899,7 @@ exports.FeatureImportanceAnalysis = {
8769
8899
  * @returns The count of created records or null.
8770
8900
  */
8771
8901
  async updateMany(props, globalClient) {
8772
- var _a, _b, _c, _d, _e;
8902
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
8773
8903
  // Maximum number of retries for database connection issues
8774
8904
  const MAX_RETRIES = 3;
8775
8905
  let retryCount = 0;
@@ -12191,21 +12321,52 @@ exports.FeatureImportanceAnalysis = {
12191
12321
  }
12192
12322
  catch (error) {
12193
12323
  lastError = error;
12324
+ // Check for constraint violations FIRST - these are NEVER retryable
12325
+ const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
12326
+ ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
12327
+ ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
12328
+ ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
12329
+ ((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
12330
+ ((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
12331
+ ((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('P2002')) ||
12332
+ ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
12333
+ if (isConstraintViolation) {
12334
+ const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
12335
+ logger_1.logger.error("Non-retryable constraint violation in updateManyFeatureImportanceAnalysis", {
12336
+ operation: 'updateManyFeatureImportanceAnalysis',
12337
+ model: 'FeatureImportanceAnalysis',
12338
+ error: String(error),
12339
+ constraintName: constraintMatch ? constraintMatch[1] : undefined,
12340
+ errorCategory: 'CONSTRAINT_VIOLATION',
12341
+ isRetryable: false,
12342
+ });
12343
+ throw error;
12344
+ }
12194
12345
  // Check if this is a database connection error that we should retry
12195
- const isConnectionError = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('Server has closed the connection')) ||
12196
- ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('Cannot reach database server')) ||
12197
- ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Connection timed out')) ||
12198
- ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Accelerate')) || // Prisma Accelerate proxy errors
12199
- (error.networkError && ((_e = error.networkError.message) === null || _e === void 0 ? void 0 : _e.includes('Failed to fetch')));
12346
+ const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
12347
+ ((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
12348
+ ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
12349
+ ((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Accelerate')) || // Prisma Accelerate proxy errors
12350
+ (error.networkError && ((_p = error.networkError.message) === null || _p === void 0 ? void 0 : _p.includes('Failed to fetch')));
12200
12351
  if (isConnectionError && retryCount < MAX_RETRIES - 1) {
12201
12352
  retryCount++;
12202
12353
  const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
12203
- logger_1.logger.warn("Database connection error, retrying...");
12354
+ logger_1.logger.warn("Database connection error in updateManyFeatureImportanceAnalysis, retrying...", {
12355
+ operation: 'updateManyFeatureImportanceAnalysis',
12356
+ model: 'FeatureImportanceAnalysis',
12357
+ attempt: retryCount,
12358
+ maxRetries: MAX_RETRIES,
12359
+ });
12204
12360
  await new Promise(resolve => setTimeout(resolve, delay));
12205
12361
  continue;
12206
12362
  }
12207
- // Log the error and rethrow
12208
- logger_1.logger.error("Database error occurred", { error: String(error) });
12363
+ // Log structured error details and rethrow
12364
+ logger_1.logger.error("Database updateMany operation failed", {
12365
+ operation: 'updateManyFeatureImportanceAnalysis',
12366
+ model: 'FeatureImportanceAnalysis',
12367
+ error: String(error),
12368
+ isRetryable: isConnectionError,
12369
+ });
12209
12370
  throw error;
12210
12371
  }
12211
12372
  }
@@ -12220,7 +12381,7 @@ exports.FeatureImportanceAnalysis = {
12220
12381
  * @returns The deleted FeatureImportanceAnalysis or null.
12221
12382
  */
12222
12383
  async delete(props, globalClient) {
12223
- var _a, _b, _c, _d, _e;
12384
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
12224
12385
  // Maximum number of retries for database connection issues
12225
12386
  const MAX_RETRIES = 3;
12226
12387
  let retryCount = 0;
@@ -12264,21 +12425,58 @@ exports.FeatureImportanceAnalysis = {
12264
12425
  }
12265
12426
  catch (error) {
12266
12427
  lastError = error;
12428
+ // Check for constraint violations FIRST - these are NEVER retryable
12429
+ // (e.g., foreign key constraints preventing deletion)
12430
+ const isConstraintViolation = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('violates check constraint')) ||
12431
+ ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('violates unique constraint')) ||
12432
+ ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('violates foreign key constraint')) ||
12433
+ ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unique constraint')) ||
12434
+ ((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('23514')) ||
12435
+ ((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('23505')) ||
12436
+ ((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('23503')) ||
12437
+ ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2002')) ||
12438
+ ((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('P2003')) ||
12439
+ ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('P2014'));
12440
+ if (isConstraintViolation) {
12441
+ const constraintMatch = (_l = error.message) === null || _l === void 0 ? void 0 : _l.match(/constraint\s+"([^"]+)"/);
12442
+ logger_1.logger.error("Non-retryable constraint violation in deleteOneFeatureImportanceAnalysis", {
12443
+ operation: 'deleteOneFeatureImportanceAnalysis',
12444
+ model: 'FeatureImportanceAnalysis',
12445
+ error: String(error),
12446
+ recordId: props.id,
12447
+ constraintName: constraintMatch ? constraintMatch[1] : undefined,
12448
+ errorCategory: 'CONSTRAINT_VIOLATION',
12449
+ isRetryable: false,
12450
+ });
12451
+ throw error;
12452
+ }
12267
12453
  // Check if this is a database connection error that we should retry
12268
- const isConnectionError = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('Server has closed the connection')) ||
12269
- ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('Cannot reach database server')) ||
12270
- ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Connection timed out')) ||
12271
- ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Accelerate')) || // Prisma Accelerate proxy errors
12272
- (error.networkError && ((_e = error.networkError.message) === null || _e === void 0 ? void 0 : _e.includes('Failed to fetch')));
12454
+ const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
12455
+ ((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
12456
+ ((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
12457
+ ((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('Accelerate')) || // Prisma Accelerate proxy errors
12458
+ (error.networkError && ((_r = error.networkError.message) === null || _r === void 0 ? void 0 : _r.includes('Failed to fetch')));
12273
12459
  if (isConnectionError && retryCount < MAX_RETRIES - 1) {
12274
12460
  retryCount++;
12275
12461
  const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
12276
- logger_1.logger.warn("Database connection error, retrying...");
12462
+ logger_1.logger.warn("Database connection error in deleteOneFeatureImportanceAnalysis, retrying...", {
12463
+ operation: 'deleteOneFeatureImportanceAnalysis',
12464
+ model: 'FeatureImportanceAnalysis',
12465
+ attempt: retryCount,
12466
+ maxRetries: MAX_RETRIES,
12467
+ recordId: props.id,
12468
+ });
12277
12469
  await new Promise(resolve => setTimeout(resolve, delay));
12278
12470
  continue;
12279
12471
  }
12280
- // Log the error and rethrow
12281
- logger_1.logger.error("Database error occurred", { error: String(error) });
12472
+ // Log structured error details and rethrow
12473
+ logger_1.logger.error("Database delete operation failed", {
12474
+ operation: 'deleteOneFeatureImportanceAnalysis',
12475
+ model: 'FeatureImportanceAnalysis',
12476
+ error: String(error),
12477
+ recordId: props.id,
12478
+ isRetryable: isConnectionError,
12479
+ });
12282
12480
  throw error;
12283
12481
  }
12284
12482
  }
@@ -12348,12 +12546,22 @@ exports.FeatureImportanceAnalysis = {
12348
12546
  if (isConnectionError && retryCount < MAX_RETRIES - 1) {
12349
12547
  retryCount++;
12350
12548
  const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
12351
- logger_1.logger.warn("Database connection error, retrying...");
12549
+ logger_1.logger.warn("Database connection error in getFeatureImportanceAnalysis, retrying...", {
12550
+ operation: 'getFeatureImportanceAnalysis',
12551
+ model: 'FeatureImportanceAnalysis',
12552
+ attempt: retryCount,
12553
+ maxRetries: MAX_RETRIES,
12554
+ });
12352
12555
  await new Promise(resolve => setTimeout(resolve, delay));
12353
12556
  continue;
12354
12557
  }
12355
- // Log the error and rethrow
12356
- logger_1.logger.error("Database error occurred", { error: String(error) });
12558
+ // Log structured error details and rethrow
12559
+ logger_1.logger.error("Database get operation failed", {
12560
+ operation: 'getFeatureImportanceAnalysis',
12561
+ model: 'FeatureImportanceAnalysis',
12562
+ error: String(error),
12563
+ isRetryable: isConnectionError,
12564
+ });
12357
12565
  throw error;
12358
12566
  }
12359
12567
  }
@@ -12411,12 +12619,22 @@ exports.FeatureImportanceAnalysis = {
12411
12619
  if (isConnectionError && retryCount < MAX_RETRIES - 1) {
12412
12620
  retryCount++;
12413
12621
  const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
12414
- logger_1.logger.warn("Database connection error, retrying...");
12622
+ logger_1.logger.warn("Database connection error in getAllFeatureImportanceAnalysis, retrying...", {
12623
+ operation: 'getAllFeatureImportanceAnalysis',
12624
+ model: 'FeatureImportanceAnalysis',
12625
+ attempt: retryCount,
12626
+ maxRetries: MAX_RETRIES,
12627
+ });
12415
12628
  await new Promise(resolve => setTimeout(resolve, delay));
12416
12629
  continue;
12417
12630
  }
12418
- // Log the error and rethrow
12419
- logger_1.logger.error("Database error occurred", { error: String(error) });
12631
+ // Log structured error details and rethrow
12632
+ logger_1.logger.error("Database getAll operation failed", {
12633
+ operation: 'getAllFeatureImportanceAnalysis',
12634
+ model: 'FeatureImportanceAnalysis',
12635
+ error: String(error),
12636
+ isRetryable: isConnectionError,
12637
+ });
12420
12638
  throw error;
12421
12639
  }
12422
12640
  }
@@ -12493,12 +12711,22 @@ exports.FeatureImportanceAnalysis = {
12493
12711
  if (isConnectionError && retryCount < MAX_RETRIES - 1) {
12494
12712
  retryCount++;
12495
12713
  const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
12496
- logger_1.logger.warn("Database connection error, retrying...");
12714
+ logger_1.logger.warn("Database connection error in findManyFeatureImportanceAnalysis, retrying...", {
12715
+ operation: 'findManyFeatureImportanceAnalysis',
12716
+ model: 'FeatureImportanceAnalysis',
12717
+ attempt: retryCount,
12718
+ maxRetries: MAX_RETRIES,
12719
+ });
12497
12720
  await new Promise(resolve => setTimeout(resolve, delay));
12498
12721
  continue;
12499
12722
  }
12500
- // Log the error and rethrow
12501
- logger_1.logger.error("Database error occurred", { error: String(error) });
12723
+ // Log structured error details and rethrow
12724
+ logger_1.logger.error("Database findMany operation failed", {
12725
+ operation: 'findManyFeatureImportanceAnalysis',
12726
+ model: 'FeatureImportanceAnalysis',
12727
+ error: String(error),
12728
+ isRetryable: isConnectionError,
12729
+ });
12502
12730
  throw error;
12503
12731
  }
12504
12732
  }