@adaptic/backend-legacy 0.0.959 → 0.0.961

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 (258) hide show
  1. package/ABTest.cjs +180 -66
  2. package/Account.cjs +180 -66
  3. package/AccountDecisionRecord.cjs +180 -66
  4. package/AccountLinkingRequest.cjs +180 -66
  5. package/Action.cjs +180 -66
  6. package/Alert.cjs +180 -66
  7. package/Allocation.cjs +180 -66
  8. package/AlpacaAccount.cjs +180 -66
  9. package/AnalyticsConfiguration.cjs +180 -66
  10. package/AnalyticsSnapshot.cjs +180 -66
  11. package/Asset.cjs +180 -66
  12. package/AuditLog.cjs +180 -66
  13. package/Authenticator.cjs +180 -66
  14. package/Configuration.cjs +180 -66
  15. package/ConflictEvent.cjs +180 -66
  16. package/ConnectionHealthSnapshot.cjs +180 -66
  17. package/Customer.cjs +180 -66
  18. package/DeadLetterMessage.cjs +180 -66
  19. package/DecisionMemorySummary.cjs +180 -66
  20. package/EconomicEvent.cjs +180 -66
  21. package/EquityBar.cjs +180 -66
  22. package/Event.cjs +180 -66
  23. package/EventSnapshot.cjs +180 -66
  24. package/FeatureImportanceAnalysis.cjs +180 -66
  25. package/InstitutionalFlowSignal.cjs +180 -66
  26. package/InstitutionalHolding.cjs +180 -66
  27. package/InstitutionalSentimentAlerts.cjs +180 -66
  28. package/InstitutionalSentimentErrors.cjs +180 -66
  29. package/InstitutionalSentimentHistory.cjs +180 -66
  30. package/InstitutionalSentimentMetrics.cjs +180 -66
  31. package/InviteToken.cjs +180 -66
  32. package/LinkedProvider.cjs +180 -66
  33. package/LlmConfiguration.cjs +180 -66
  34. package/MLModelVersion.cjs +180 -66
  35. package/MLTrainingData.cjs +180 -66
  36. package/MarketSentiment.cjs +180 -66
  37. package/ModelArtifact.cjs +180 -66
  38. package/ModelVersion.cjs +180 -66
  39. package/ModelVersionArtifact.cjs +180 -66
  40. package/NewsArticle.cjs +180 -66
  41. package/NewsArticleAssetSentiment.cjs +180 -66
  42. package/OptionsContract.cjs +180 -66
  43. package/OptionsGreeksHistory.cjs +180 -66
  44. package/OptionsPosition.cjs +180 -66
  45. package/OptionsPositionEvent.cjs +180 -66
  46. package/OptionsTradeExecution.cjs +180 -66
  47. package/PolicyOverlay.cjs +180 -66
  48. package/PortfolioGreeksHistory.cjs +180 -66
  49. package/ScheduledOptionOrder.cjs +180 -66
  50. package/Session.cjs +180 -66
  51. package/SignalGeneratorMetrics.cjs +180 -66
  52. package/SignalLineage.cjs +180 -66
  53. package/SignalOutcome.cjs +180 -66
  54. package/SignalPriorityQueue.cjs +180 -66
  55. package/SyncEvent.cjs +180 -66
  56. package/SystemAlert.cjs +180 -66
  57. package/Trade.cjs +180 -66
  58. package/TradeAuditEvent.cjs +180 -66
  59. package/TradeExecutionHistory.cjs +180 -66
  60. package/TradeOutcome.cjs +180 -66
  61. package/TradingPolicy.cjs +180 -66
  62. package/User.cjs +180 -66
  63. package/VerificationToken.cjs +180 -66
  64. package/WaitlistEntry.cjs +180 -66
  65. package/esm/ABTest.d.ts.map +1 -1
  66. package/esm/ABTest.js.map +1 -1
  67. package/esm/ABTest.mjs +180 -66
  68. package/esm/Account.d.ts.map +1 -1
  69. package/esm/Account.js.map +1 -1
  70. package/esm/Account.mjs +180 -66
  71. package/esm/AccountDecisionRecord.d.ts.map +1 -1
  72. package/esm/AccountDecisionRecord.js.map +1 -1
  73. package/esm/AccountDecisionRecord.mjs +180 -66
  74. package/esm/AccountLinkingRequest.d.ts.map +1 -1
  75. package/esm/AccountLinkingRequest.js.map +1 -1
  76. package/esm/AccountLinkingRequest.mjs +180 -66
  77. package/esm/Action.d.ts.map +1 -1
  78. package/esm/Action.js.map +1 -1
  79. package/esm/Action.mjs +180 -66
  80. package/esm/Alert.d.ts.map +1 -1
  81. package/esm/Alert.js.map +1 -1
  82. package/esm/Alert.mjs +180 -66
  83. package/esm/Allocation.d.ts.map +1 -1
  84. package/esm/Allocation.js.map +1 -1
  85. package/esm/Allocation.mjs +180 -66
  86. package/esm/AlpacaAccount.d.ts.map +1 -1
  87. package/esm/AlpacaAccount.js.map +1 -1
  88. package/esm/AlpacaAccount.mjs +180 -66
  89. package/esm/AnalyticsConfiguration.d.ts.map +1 -1
  90. package/esm/AnalyticsConfiguration.js.map +1 -1
  91. package/esm/AnalyticsConfiguration.mjs +180 -66
  92. package/esm/AnalyticsSnapshot.d.ts.map +1 -1
  93. package/esm/AnalyticsSnapshot.js.map +1 -1
  94. package/esm/AnalyticsSnapshot.mjs +180 -66
  95. package/esm/Asset.d.ts.map +1 -1
  96. package/esm/Asset.js.map +1 -1
  97. package/esm/Asset.mjs +180 -66
  98. package/esm/AuditLog.d.ts.map +1 -1
  99. package/esm/AuditLog.js.map +1 -1
  100. package/esm/AuditLog.mjs +180 -66
  101. package/esm/Authenticator.d.ts.map +1 -1
  102. package/esm/Authenticator.js.map +1 -1
  103. package/esm/Authenticator.mjs +180 -66
  104. package/esm/Configuration.d.ts.map +1 -1
  105. package/esm/Configuration.js.map +1 -1
  106. package/esm/Configuration.mjs +180 -66
  107. package/esm/ConflictEvent.d.ts.map +1 -1
  108. package/esm/ConflictEvent.js.map +1 -1
  109. package/esm/ConflictEvent.mjs +180 -66
  110. package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
  111. package/esm/ConnectionHealthSnapshot.js.map +1 -1
  112. package/esm/ConnectionHealthSnapshot.mjs +180 -66
  113. package/esm/Customer.d.ts.map +1 -1
  114. package/esm/Customer.js.map +1 -1
  115. package/esm/Customer.mjs +180 -66
  116. package/esm/DeadLetterMessage.d.ts.map +1 -1
  117. package/esm/DeadLetterMessage.js.map +1 -1
  118. package/esm/DeadLetterMessage.mjs +180 -66
  119. package/esm/DecisionMemorySummary.d.ts.map +1 -1
  120. package/esm/DecisionMemorySummary.js.map +1 -1
  121. package/esm/DecisionMemorySummary.mjs +180 -66
  122. package/esm/EconomicEvent.d.ts.map +1 -1
  123. package/esm/EconomicEvent.js.map +1 -1
  124. package/esm/EconomicEvent.mjs +180 -66
  125. package/esm/EquityBar.d.ts.map +1 -1
  126. package/esm/EquityBar.js.map +1 -1
  127. package/esm/EquityBar.mjs +180 -66
  128. package/esm/Event.d.ts.map +1 -1
  129. package/esm/Event.js.map +1 -1
  130. package/esm/Event.mjs +180 -66
  131. package/esm/EventSnapshot.d.ts.map +1 -1
  132. package/esm/EventSnapshot.js.map +1 -1
  133. package/esm/EventSnapshot.mjs +180 -66
  134. package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
  135. package/esm/FeatureImportanceAnalysis.js.map +1 -1
  136. package/esm/FeatureImportanceAnalysis.mjs +180 -66
  137. package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
  138. package/esm/InstitutionalFlowSignal.js.map +1 -1
  139. package/esm/InstitutionalFlowSignal.mjs +180 -66
  140. package/esm/InstitutionalHolding.d.ts.map +1 -1
  141. package/esm/InstitutionalHolding.js.map +1 -1
  142. package/esm/InstitutionalHolding.mjs +180 -66
  143. package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
  144. package/esm/InstitutionalSentimentAlerts.js.map +1 -1
  145. package/esm/InstitutionalSentimentAlerts.mjs +180 -66
  146. package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
  147. package/esm/InstitutionalSentimentErrors.js.map +1 -1
  148. package/esm/InstitutionalSentimentErrors.mjs +180 -66
  149. package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
  150. package/esm/InstitutionalSentimentHistory.js.map +1 -1
  151. package/esm/InstitutionalSentimentHistory.mjs +180 -66
  152. package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
  153. package/esm/InstitutionalSentimentMetrics.js.map +1 -1
  154. package/esm/InstitutionalSentimentMetrics.mjs +180 -66
  155. package/esm/InviteToken.d.ts.map +1 -1
  156. package/esm/InviteToken.js.map +1 -1
  157. package/esm/InviteToken.mjs +180 -66
  158. package/esm/LinkedProvider.d.ts.map +1 -1
  159. package/esm/LinkedProvider.js.map +1 -1
  160. package/esm/LinkedProvider.mjs +180 -66
  161. package/esm/LlmConfiguration.d.ts.map +1 -1
  162. package/esm/LlmConfiguration.js.map +1 -1
  163. package/esm/LlmConfiguration.mjs +180 -66
  164. package/esm/MLModelVersion.d.ts.map +1 -1
  165. package/esm/MLModelVersion.js.map +1 -1
  166. package/esm/MLModelVersion.mjs +180 -66
  167. package/esm/MLTrainingData.d.ts.map +1 -1
  168. package/esm/MLTrainingData.js.map +1 -1
  169. package/esm/MLTrainingData.mjs +180 -66
  170. package/esm/MarketSentiment.d.ts.map +1 -1
  171. package/esm/MarketSentiment.js.map +1 -1
  172. package/esm/MarketSentiment.mjs +180 -66
  173. package/esm/ModelArtifact.d.ts.map +1 -1
  174. package/esm/ModelArtifact.js.map +1 -1
  175. package/esm/ModelArtifact.mjs +180 -66
  176. package/esm/ModelVersion.d.ts.map +1 -1
  177. package/esm/ModelVersion.js.map +1 -1
  178. package/esm/ModelVersion.mjs +180 -66
  179. package/esm/ModelVersionArtifact.d.ts.map +1 -1
  180. package/esm/ModelVersionArtifact.js.map +1 -1
  181. package/esm/ModelVersionArtifact.mjs +180 -66
  182. package/esm/NewsArticle.d.ts.map +1 -1
  183. package/esm/NewsArticle.js.map +1 -1
  184. package/esm/NewsArticle.mjs +180 -66
  185. package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
  186. package/esm/NewsArticleAssetSentiment.js.map +1 -1
  187. package/esm/NewsArticleAssetSentiment.mjs +180 -66
  188. package/esm/OptionsContract.d.ts.map +1 -1
  189. package/esm/OptionsContract.js.map +1 -1
  190. package/esm/OptionsContract.mjs +180 -66
  191. package/esm/OptionsGreeksHistory.d.ts.map +1 -1
  192. package/esm/OptionsGreeksHistory.js.map +1 -1
  193. package/esm/OptionsGreeksHistory.mjs +180 -66
  194. package/esm/OptionsPosition.d.ts.map +1 -1
  195. package/esm/OptionsPosition.js.map +1 -1
  196. package/esm/OptionsPosition.mjs +180 -66
  197. package/esm/OptionsPositionEvent.d.ts.map +1 -1
  198. package/esm/OptionsPositionEvent.js.map +1 -1
  199. package/esm/OptionsPositionEvent.mjs +180 -66
  200. package/esm/OptionsTradeExecution.d.ts.map +1 -1
  201. package/esm/OptionsTradeExecution.js.map +1 -1
  202. package/esm/OptionsTradeExecution.mjs +180 -66
  203. package/esm/PolicyOverlay.d.ts.map +1 -1
  204. package/esm/PolicyOverlay.js.map +1 -1
  205. package/esm/PolicyOverlay.mjs +180 -66
  206. package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
  207. package/esm/PortfolioGreeksHistory.js.map +1 -1
  208. package/esm/PortfolioGreeksHistory.mjs +180 -66
  209. package/esm/ScheduledOptionOrder.d.ts.map +1 -1
  210. package/esm/ScheduledOptionOrder.js.map +1 -1
  211. package/esm/ScheduledOptionOrder.mjs +180 -66
  212. package/esm/Session.d.ts.map +1 -1
  213. package/esm/Session.js.map +1 -1
  214. package/esm/Session.mjs +180 -66
  215. package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
  216. package/esm/SignalGeneratorMetrics.js.map +1 -1
  217. package/esm/SignalGeneratorMetrics.mjs +180 -66
  218. package/esm/SignalLineage.d.ts.map +1 -1
  219. package/esm/SignalLineage.js.map +1 -1
  220. package/esm/SignalLineage.mjs +180 -66
  221. package/esm/SignalOutcome.d.ts.map +1 -1
  222. package/esm/SignalOutcome.js.map +1 -1
  223. package/esm/SignalOutcome.mjs +180 -66
  224. package/esm/SignalPriorityQueue.d.ts.map +1 -1
  225. package/esm/SignalPriorityQueue.js.map +1 -1
  226. package/esm/SignalPriorityQueue.mjs +180 -66
  227. package/esm/SyncEvent.d.ts.map +1 -1
  228. package/esm/SyncEvent.js.map +1 -1
  229. package/esm/SyncEvent.mjs +180 -66
  230. package/esm/SystemAlert.d.ts.map +1 -1
  231. package/esm/SystemAlert.js.map +1 -1
  232. package/esm/SystemAlert.mjs +180 -66
  233. package/esm/Trade.d.ts.map +1 -1
  234. package/esm/Trade.js.map +1 -1
  235. package/esm/Trade.mjs +180 -66
  236. package/esm/TradeAuditEvent.d.ts.map +1 -1
  237. package/esm/TradeAuditEvent.js.map +1 -1
  238. package/esm/TradeAuditEvent.mjs +180 -66
  239. package/esm/TradeExecutionHistory.d.ts.map +1 -1
  240. package/esm/TradeExecutionHistory.js.map +1 -1
  241. package/esm/TradeExecutionHistory.mjs +180 -66
  242. package/esm/TradeOutcome.d.ts.map +1 -1
  243. package/esm/TradeOutcome.js.map +1 -1
  244. package/esm/TradeOutcome.mjs +180 -66
  245. package/esm/TradingPolicy.d.ts.map +1 -1
  246. package/esm/TradingPolicy.js.map +1 -1
  247. package/esm/TradingPolicy.mjs +180 -66
  248. package/esm/User.d.ts.map +1 -1
  249. package/esm/User.js.map +1 -1
  250. package/esm/User.mjs +180 -66
  251. package/esm/VerificationToken.d.ts.map +1 -1
  252. package/esm/VerificationToken.js.map +1 -1
  253. package/esm/VerificationToken.mjs +180 -66
  254. package/esm/WaitlistEntry.d.ts.map +1 -1
  255. package/esm/WaitlistEntry.js.map +1 -1
  256. package/esm/WaitlistEntry.mjs +180 -66
  257. package/esm/index.d.ts.map +1 -1
  258. package/package.json +1 -1
package/esm/AuditLog.mjs CHANGED
@@ -144,13 +144,28 @@ export const AuditLog = {
144
144
  await new Promise(resolve => setTimeout(resolve, delay));
145
145
  continue;
146
146
  }
147
- // Log structured error details and rethrow
148
- logger.error("Database create operation failed", {
149
- operation: 'createOneAuditLog',
150
- model: 'AuditLog',
151
- error: String(error),
152
- isRetryable: isConnectionError,
153
- });
147
+ // Log structured error details and rethrow.
148
+ // Demote transient failures to WARN with explicit transient+recoveryHint
149
+ // metadata so log analytics can distinguish recoverable upstream retries
150
+ // from true defects.
151
+ if (isConnectionError) {
152
+ logger.warn("Database create operation failed (transient after retries)", {
153
+ operation: 'createOneAuditLog',
154
+ model: 'AuditLog',
155
+ error: String(error),
156
+ isRetryable: true,
157
+ transient: true,
158
+ recoveryHint: "Upstream caller should retry on next cycle",
159
+ });
160
+ }
161
+ else {
162
+ logger.error("Database create operation failed", {
163
+ operation: 'createOneAuditLog',
164
+ model: 'AuditLog',
165
+ error: String(error),
166
+ isRetryable: false,
167
+ });
168
+ }
154
169
  throw error;
155
170
  }
156
171
  }
@@ -276,13 +291,25 @@ export const AuditLog = {
276
291
  await new Promise(resolve => setTimeout(resolve, delay));
277
292
  continue;
278
293
  }
279
- // Log structured error details and rethrow
280
- logger.error("Database createMany operation failed", {
281
- operation: 'createManyAuditLog',
282
- model: 'AuditLog',
283
- error: String(error),
284
- isRetryable: isConnectionError,
285
- });
294
+ // Log structured error details and rethrow (transient -> WARN).
295
+ if (isConnectionError) {
296
+ logger.warn("Database createMany operation failed (transient after retries)", {
297
+ operation: 'createManyAuditLog',
298
+ model: 'AuditLog',
299
+ error: String(error),
300
+ isRetryable: true,
301
+ transient: true,
302
+ recoveryHint: "Upstream caller should retry on next cycle",
303
+ });
304
+ }
305
+ else {
306
+ logger.error("Database createMany operation failed", {
307
+ operation: 'createManyAuditLog',
308
+ model: 'AuditLog',
309
+ error: String(error),
310
+ isRetryable: false,
311
+ });
312
+ }
286
313
  throw error;
287
314
  }
288
315
  }
@@ -429,14 +456,27 @@ export const AuditLog = {
429
456
  await new Promise(resolve => setTimeout(resolve, delay));
430
457
  continue;
431
458
  }
432
- // Log structured error details and rethrow
433
- logger.error("Database update operation failed", {
434
- operation: 'updateOneAuditLog',
435
- model: 'AuditLog',
436
- error: String(error),
437
- recordId: props.id,
438
- isRetryable: isConnectionError,
439
- });
459
+ // Log structured error details and rethrow (transient -> WARN).
460
+ if (isConnectionError) {
461
+ logger.warn("Database update operation failed (transient after retries)", {
462
+ operation: 'updateOneAuditLog',
463
+ model: 'AuditLog',
464
+ error: String(error),
465
+ recordId: props.id,
466
+ isRetryable: true,
467
+ transient: true,
468
+ recoveryHint: "Upstream caller should retry on next cycle",
469
+ });
470
+ }
471
+ else {
472
+ logger.error("Database update operation failed", {
473
+ operation: 'updateOneAuditLog',
474
+ model: 'AuditLog',
475
+ error: String(error),
476
+ recordId: props.id,
477
+ isRetryable: false,
478
+ });
479
+ }
440
480
  throw error;
441
481
  }
442
482
  }
@@ -594,14 +634,27 @@ export const AuditLog = {
594
634
  await new Promise(resolve => setTimeout(resolve, delay));
595
635
  continue;
596
636
  }
597
- // Log structured error details and rethrow
598
- logger.error("Database upsert operation failed", {
599
- operation: 'upsertOneAuditLog',
600
- model: 'AuditLog',
601
- error: String(error),
602
- recordId: props.id,
603
- isRetryable: isConnectionError,
604
- });
637
+ // Log structured error details and rethrow (transient -> WARN).
638
+ if (isConnectionError) {
639
+ logger.warn("Database upsert operation failed (transient after retries)", {
640
+ operation: 'upsertOneAuditLog',
641
+ model: 'AuditLog',
642
+ error: String(error),
643
+ recordId: props.id,
644
+ isRetryable: true,
645
+ transient: true,
646
+ recoveryHint: "Upstream caller should retry on next cycle",
647
+ });
648
+ }
649
+ else {
650
+ logger.error("Database upsert operation failed", {
651
+ operation: 'upsertOneAuditLog',
652
+ model: 'AuditLog',
653
+ error: String(error),
654
+ recordId: props.id,
655
+ isRetryable: false,
656
+ });
657
+ }
605
658
  throw error;
606
659
  }
607
660
  }
@@ -746,13 +799,25 @@ export const AuditLog = {
746
799
  await new Promise(resolve => setTimeout(resolve, delay));
747
800
  continue;
748
801
  }
749
- // Log structured error details and rethrow
750
- logger.error("Database updateMany operation failed", {
751
- operation: 'updateManyAuditLog',
752
- model: 'AuditLog',
753
- error: String(error),
754
- isRetryable: isConnectionError,
755
- });
802
+ // Log structured error details and rethrow (transient -> WARN).
803
+ if (isConnectionError) {
804
+ logger.warn("Database updateMany operation failed (transient after retries)", {
805
+ operation: 'updateManyAuditLog',
806
+ model: 'AuditLog',
807
+ error: String(error),
808
+ isRetryable: true,
809
+ transient: true,
810
+ recoveryHint: "Upstream caller should retry on next cycle",
811
+ });
812
+ }
813
+ else {
814
+ logger.error("Database updateMany operation failed", {
815
+ operation: 'updateManyAuditLog',
816
+ model: 'AuditLog',
817
+ error: String(error),
818
+ isRetryable: false,
819
+ });
820
+ }
756
821
  throw error;
757
822
  }
758
823
  }
@@ -874,14 +939,27 @@ export const AuditLog = {
874
939
  await new Promise(resolve => setTimeout(resolve, delay));
875
940
  continue;
876
941
  }
877
- // Log structured error details and rethrow
878
- logger.error("Database delete operation failed", {
879
- operation: 'deleteOneAuditLog',
880
- model: 'AuditLog',
881
- error: String(error),
882
- recordId: props.id,
883
- isRetryable: isConnectionError,
884
- });
942
+ // Log structured error details and rethrow (transient -> WARN).
943
+ if (isConnectionError) {
944
+ logger.warn("Database delete operation failed (transient after retries)", {
945
+ operation: 'deleteOneAuditLog',
946
+ model: 'AuditLog',
947
+ error: String(error),
948
+ recordId: props.id,
949
+ isRetryable: true,
950
+ transient: true,
951
+ recoveryHint: "Upstream caller should retry on next cycle",
952
+ });
953
+ }
954
+ else {
955
+ logger.error("Database delete operation failed", {
956
+ operation: 'deleteOneAuditLog',
957
+ model: 'AuditLog',
958
+ error: String(error),
959
+ recordId: props.id,
960
+ isRetryable: false,
961
+ });
962
+ }
885
963
  throw error;
886
964
  }
887
965
  }
@@ -979,13 +1057,25 @@ export const AuditLog = {
979
1057
  await new Promise(resolve => setTimeout(resolve, delay));
980
1058
  continue;
981
1059
  }
982
- // Log structured error details and rethrow
983
- logger.error("Database get operation failed", {
984
- operation: 'getAuditLog',
985
- model: 'AuditLog',
986
- error: String(error),
987
- isRetryable: isConnectionError,
988
- });
1060
+ // Log structured error details and rethrow (transient -> WARN).
1061
+ if (isConnectionError) {
1062
+ logger.warn("Database get operation failed (transient after retries)", {
1063
+ operation: 'getAuditLog',
1064
+ model: 'AuditLog',
1065
+ error: String(error),
1066
+ isRetryable: true,
1067
+ transient: true,
1068
+ recoveryHint: "Upstream caller should retry on next cycle",
1069
+ });
1070
+ }
1071
+ else {
1072
+ logger.error("Database get operation failed", {
1073
+ operation: 'getAuditLog',
1074
+ model: 'AuditLog',
1075
+ error: String(error),
1076
+ isRetryable: false,
1077
+ });
1078
+ }
989
1079
  throw error;
990
1080
  }
991
1081
  }
@@ -1071,13 +1161,25 @@ export const AuditLog = {
1071
1161
  await new Promise(resolve => setTimeout(resolve, delay));
1072
1162
  continue;
1073
1163
  }
1074
- // Log structured error details and rethrow
1075
- logger.error("Database getAll operation failed", {
1076
- operation: 'getAllAuditLog',
1077
- model: 'AuditLog',
1078
- error: String(error),
1079
- isRetryable: isConnectionError,
1080
- });
1164
+ // Log structured error details and rethrow (transient -> WARN).
1165
+ if (isConnectionError) {
1166
+ logger.warn("Database getAll operation failed (transient after retries)", {
1167
+ operation: 'getAllAuditLog',
1168
+ model: 'AuditLog',
1169
+ error: String(error),
1170
+ isRetryable: true,
1171
+ transient: true,
1172
+ recoveryHint: "Upstream caller should retry on next cycle",
1173
+ });
1174
+ }
1175
+ else {
1176
+ logger.error("Database getAll operation failed", {
1177
+ operation: 'getAllAuditLog',
1178
+ model: 'AuditLog',
1179
+ error: String(error),
1180
+ isRetryable: false,
1181
+ });
1182
+ }
1081
1183
  throw error;
1082
1184
  }
1083
1185
  }
@@ -1187,13 +1289,25 @@ export const AuditLog = {
1187
1289
  await new Promise(resolve => setTimeout(resolve, delay));
1188
1290
  continue;
1189
1291
  }
1190
- // Log structured error details and rethrow
1191
- logger.error("Database findMany operation failed", {
1192
- operation: 'findManyAuditLog',
1193
- model: 'AuditLog',
1194
- error: String(error),
1195
- isRetryable: isConnectionError,
1196
- });
1292
+ // Log structured error details and rethrow (transient -> WARN).
1293
+ if (isConnectionError) {
1294
+ logger.warn("Database findMany operation failed (transient after retries)", {
1295
+ operation: 'findManyAuditLog',
1296
+ model: 'AuditLog',
1297
+ error: String(error),
1298
+ isRetryable: true,
1299
+ transient: true,
1300
+ recoveryHint: "Upstream caller should retry on next cycle",
1301
+ });
1302
+ }
1303
+ else {
1304
+ logger.error("Database findMany operation failed", {
1305
+ operation: 'findManyAuditLog',
1306
+ model: 'AuditLog',
1307
+ error: String(error),
1308
+ isRetryable: false,
1309
+ });
1310
+ }
1197
1311
  throw error;
1198
1312
  }
1199
1313
  }
@@ -1 +1 @@
1
-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