@zudojs/errors 1.3.1 → 1.4.0

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 (418) hide show
  1. package/README.md +1 -0
  2. package/dist/base/core/baseError.core.d.ts +6 -1
  3. package/dist/base/core/baseError.core.js +6 -1
  4. package/dist/base/core/baseError.serialize.d.ts +0 -1
  5. package/dist/base/core/baseError.serialize.js +0 -1
  6. package/dist/base/core/errorCause.redact.d.ts +0 -1
  7. package/dist/base/core/errorCause.redact.js +0 -1
  8. package/dist/base/core/errorMetadata.core.d.ts +0 -1
  9. package/dist/base/core/errorMetadata.core.js +0 -1
  10. package/dist/base/core/errorMetadata.type.d.ts +0 -1
  11. package/dist/base/core/errorMetadata.type.js +0 -1
  12. package/dist/base/core/index.d.ts +0 -1
  13. package/dist/base/core/index.js +0 -1
  14. package/dist/base/index.d.ts +0 -1
  15. package/dist/base/index.js +0 -1
  16. package/dist/base/types/baseError.type.d.ts +6 -1
  17. package/dist/base/types/baseError.type.js +0 -1
  18. package/dist/base/types/errorCategory.enum.d.ts +0 -1
  19. package/dist/base/types/errorCategory.enum.js +0 -1
  20. package/dist/base/types/errorCategory.helpers.d.ts +0 -1
  21. package/dist/base/types/errorCategory.helpers.js +0 -1
  22. package/dist/base/types/errorCategory.type.d.ts +0 -1
  23. package/dist/base/types/errorCategory.type.js +0 -1
  24. package/dist/base/types/errorCode.type.d.ts +0 -1
  25. package/dist/base/types/errorCode.type.js +0 -1
  26. package/dist/base/types/errorSeverity.type.d.ts +0 -1
  27. package/dist/base/types/errorSeverity.type.js +0 -1
  28. package/dist/base/types/index.d.ts +0 -1
  29. package/dist/base/types/index.js +0 -1
  30. package/dist/base/utils/baseError.utils.d.ts +0 -1
  31. package/dist/base/utils/baseError.utils.js +0 -1
  32. package/dist/base/utils/index.d.ts +0 -1
  33. package/dist/base/utils/index.js +0 -1
  34. package/dist/domain/access/authError.base.d.ts +0 -1
  35. package/dist/domain/access/authError.base.js +0 -1
  36. package/dist/domain/access/authentication.error.d.ts +0 -1
  37. package/dist/domain/access/authentication.error.js +0 -1
  38. package/dist/domain/access/authorization.error.d.ts +0 -1
  39. package/dist/domain/access/authorization.error.js +0 -1
  40. package/dist/domain/access/index.d.ts +0 -1
  41. package/dist/domain/access/index.js +0 -1
  42. package/dist/domain/access/oauthError.base.d.ts +0 -1
  43. package/dist/domain/access/oauthError.base.js +0 -1
  44. package/dist/domain/access/rateLimit.error.d.ts +0 -1
  45. package/dist/domain/access/rateLimit.error.js +0 -1
  46. package/dist/domain/api/api.error.d.ts +0 -1
  47. package/dist/domain/api/api.error.js +0 -1
  48. package/dist/domain/api/apiError.base.d.ts +0 -1
  49. package/dist/domain/api/apiError.base.js +0 -1
  50. package/dist/domain/api/apiError.lifecycle.d.ts +0 -1
  51. package/dist/domain/api/apiError.lifecycle.js +0 -1
  52. package/dist/domain/api/apiError.routing.d.ts +0 -1
  53. package/dist/domain/api/apiError.routing.js +0 -1
  54. package/dist/domain/api/index.d.ts +0 -1
  55. package/dist/domain/api/index.js +0 -1
  56. package/dist/domain/app/application.error.d.ts +0 -1
  57. package/dist/domain/app/application.error.js +0 -1
  58. package/dist/domain/app/configuration.error.d.ts +0 -1
  59. package/dist/domain/app/configuration.error.js +0 -1
  60. package/dist/domain/app/domain.error.d.ts +0 -1
  61. package/dist/domain/app/domain.error.js +0 -1
  62. package/dist/domain/app/index.d.ts +0 -1
  63. package/dist/domain/app/index.js +0 -1
  64. package/dist/domain/app/lifecycle.error.d.ts +0 -1
  65. package/dist/domain/app/lifecycle.error.js +0 -1
  66. package/dist/domain/app/lifecycleError.base.d.ts +0 -1
  67. package/dist/domain/app/lifecycleError.base.js +0 -1
  68. package/dist/domain/app/lifecycleError.types.d.ts +0 -1
  69. package/dist/domain/app/lifecycleError.types.js +0 -1
  70. package/dist/domain/app/module.error.d.ts +0 -1
  71. package/dist/domain/app/module.error.js +0 -1
  72. package/dist/domain/app/moduleError.base.d.ts +0 -1
  73. package/dist/domain/app/moduleError.base.js +0 -1
  74. package/dist/domain/app/moduleError.types.d.ts +0 -1
  75. package/dist/domain/app/moduleError.types.js +0 -1
  76. package/dist/domain/body/bodyParser.error.d.ts +0 -1
  77. package/dist/domain/body/bodyParser.error.js +0 -1
  78. package/dist/domain/body/httpBody.error.d.ts +0 -1
  79. package/dist/domain/body/httpBody.error.js +0 -1
  80. package/dist/domain/body/httpBodyError.base.d.ts +0 -1
  81. package/dist/domain/body/httpBodyError.base.js +0 -1
  82. package/dist/domain/body/httpBodyError.types.d.ts +0 -1
  83. package/dist/domain/body/httpBodyError.types.js +0 -1
  84. package/dist/domain/body/httpFormData.error.d.ts +0 -1
  85. package/dist/domain/body/httpFormData.error.js +0 -1
  86. package/dist/domain/body/index.d.ts +0 -1
  87. package/dist/domain/body/index.js +0 -1
  88. package/dist/domain/body/multipart.error.d.ts +0 -1
  89. package/dist/domain/body/multipart.error.js +0 -1
  90. package/dist/domain/cli/cliError.base.d.ts +0 -1
  91. package/dist/domain/cli/cliError.base.js +0 -1
  92. package/dist/domain/cli/index.d.ts +0 -1
  93. package/dist/domain/cli/index.js +0 -1
  94. package/dist/domain/constant/constantError.base.d.ts +0 -1
  95. package/dist/domain/constant/constantError.base.js +0 -1
  96. package/dist/domain/constant/index.d.ts +0 -1
  97. package/dist/domain/constant/index.js +0 -1
  98. package/dist/domain/cqrs/cqrsError.base.d.ts +0 -1
  99. package/dist/domain/cqrs/cqrsError.base.js +0 -1
  100. package/dist/domain/cqrs/cqrsError.result.d.ts +0 -1
  101. package/dist/domain/cqrs/cqrsError.result.js +0 -1
  102. package/dist/domain/cqrs/index.d.ts +0 -1
  103. package/dist/domain/cqrs/index.js +0 -1
  104. package/dist/domain/documentation/documentation.error.d.ts +0 -1
  105. package/dist/domain/documentation/documentation.error.js +0 -1
  106. package/dist/domain/documentation/documentationError.base.d.ts +0 -1
  107. package/dist/domain/documentation/documentationError.base.js +0 -1
  108. package/dist/domain/documentation/documentationError.types.d.ts +0 -1
  109. package/dist/domain/documentation/documentationError.types.js +0 -1
  110. package/dist/domain/documentation/index.d.ts +0 -1
  111. package/dist/domain/documentation/index.js +0 -1
  112. package/dist/domain/event/event.error.d.ts +0 -1
  113. package/dist/domain/event/event.error.js +0 -1
  114. package/dist/domain/event/eventError.base.d.ts +0 -1
  115. package/dist/domain/event/eventError.base.js +0 -1
  116. package/dist/domain/event/eventError.handler.d.ts +0 -1
  117. package/dist/domain/event/eventError.handler.js +0 -1
  118. package/dist/domain/event/eventError.lifecycle.d.ts +0 -1
  119. package/dist/domain/event/eventError.lifecycle.js +0 -1
  120. package/dist/domain/event/eventError.serialization.d.ts +0 -1
  121. package/dist/domain/event/eventError.serialization.js +0 -1
  122. package/dist/domain/event/index.d.ts +0 -1
  123. package/dist/domain/event/index.js +0 -1
  124. package/dist/domain/index.d.ts +0 -1
  125. package/dist/domain/index.js +0 -1
  126. package/dist/domain/message/index.d.ts +0 -1
  127. package/dist/domain/message/index.js +0 -1
  128. package/dist/domain/message/message.error.d.ts +0 -1
  129. package/dist/domain/message/message.error.js +0 -1
  130. package/dist/domain/message/messageError.base.d.ts +0 -1
  131. package/dist/domain/message/messageError.base.js +0 -1
  132. package/dist/domain/message/messageError.handler.d.ts +0 -1
  133. package/dist/domain/message/messageError.handler.js +0 -1
  134. package/dist/domain/message/messageError.lifecycle.d.ts +0 -1
  135. package/dist/domain/message/messageError.lifecycle.js +0 -1
  136. package/dist/domain/message/messageError.serialization.d.ts +0 -1
  137. package/dist/domain/message/messageError.serialization.js +0 -1
  138. package/dist/domain/message/messageError.validation.d.ts +0 -1
  139. package/dist/domain/message/messageError.validation.js +0 -1
  140. package/dist/domain/openapi/index.d.ts +0 -1
  141. package/dist/domain/openapi/index.js +0 -1
  142. package/dist/domain/openapi/openApiError.base.d.ts +0 -1
  143. package/dist/domain/openapi/openApiError.base.js +0 -1
  144. package/dist/domain/plugin/index.d.ts +0 -1
  145. package/dist/domain/plugin/index.js +0 -1
  146. package/dist/domain/plugin/plugin.error.d.ts +0 -1
  147. package/dist/domain/plugin/plugin.error.js +0 -1
  148. package/dist/domain/plugin/pluginError.base.d.ts +0 -1
  149. package/dist/domain/plugin/pluginError.base.js +0 -1
  150. package/dist/domain/plugin/pluginError.lifecycle.d.ts +0 -1
  151. package/dist/domain/plugin/pluginError.lifecycle.js +0 -1
  152. package/dist/domain/plugin/pluginError.runtime.d.ts +0 -1
  153. package/dist/domain/plugin/pluginError.runtime.js +0 -1
  154. package/dist/domain/queue/index.d.ts +0 -1
  155. package/dist/domain/queue/index.js +0 -1
  156. package/dist/domain/queue/queue.error.d.ts +0 -1
  157. package/dist/domain/queue/queue.error.js +0 -1
  158. package/dist/domain/queue/queueError.base.d.ts +0 -1
  159. package/dist/domain/queue/queueError.base.js +0 -1
  160. package/dist/domain/queue/queueError.job.d.ts +0 -1
  161. package/dist/domain/queue/queueError.job.js +0 -1
  162. package/dist/domain/queue/queueError.queue.d.ts +0 -1
  163. package/dist/domain/queue/queueError.queue.js +0 -1
  164. package/dist/domain/queue/queueError.worker.d.ts +0 -1
  165. package/dist/domain/queue/queueError.worker.js +0 -1
  166. package/dist/domain/rpc/index.d.ts +0 -1
  167. package/dist/domain/rpc/index.js +0 -1
  168. package/dist/domain/rpc/rpc.error.d.ts +0 -1
  169. package/dist/domain/rpc/rpc.error.js +0 -1
  170. package/dist/domain/rpc/rpcError.base.d.ts +0 -1
  171. package/dist/domain/rpc/rpcError.base.js +0 -1
  172. package/dist/domain/rpc/rpcError.protocol.d.ts +0 -1
  173. package/dist/domain/rpc/rpcError.protocol.js +0 -1
  174. package/dist/domain/rpc/rpcError.transport.d.ts +0 -1
  175. package/dist/domain/rpc/rpcError.transport.js +0 -1
  176. package/dist/domain/scheduler/index.d.ts +0 -1
  177. package/dist/domain/scheduler/index.js +0 -1
  178. package/dist/domain/scheduler/scheduler.error.d.ts +0 -1
  179. package/dist/domain/scheduler/scheduler.error.js +0 -1
  180. package/dist/domain/scheduler/schedulerError.base.d.ts +0 -1
  181. package/dist/domain/scheduler/schedulerError.base.js +0 -1
  182. package/dist/domain/scheduler/schedulerError.execution.d.ts +0 -1
  183. package/dist/domain/scheduler/schedulerError.execution.js +0 -1
  184. package/dist/domain/scheduler/schedulerError.schedule.d.ts +0 -1
  185. package/dist/domain/scheduler/schedulerError.schedule.js +0 -1
  186. package/dist/domain/schema/index.d.ts +0 -1
  187. package/dist/domain/schema/index.js +0 -1
  188. package/dist/domain/schema/schema.error.d.ts +0 -1
  189. package/dist/domain/schema/schema.error.js +0 -1
  190. package/dist/domain/schema/schemaError.base.d.ts +0 -1
  191. package/dist/domain/schema/schemaError.base.js +0 -1
  192. package/dist/domain/schema/schemaError.types.d.ts +0 -1
  193. package/dist/domain/schema/schemaError.types.js +0 -1
  194. package/dist/domain/serialization/index.d.ts +0 -1
  195. package/dist/domain/serialization/index.js +0 -1
  196. package/dist/domain/serialization/serialization.error.d.ts +2 -2
  197. package/dist/domain/serialization/serialization.error.js +2 -2
  198. package/dist/domain/serialization/serializationError.base.d.ts +0 -1
  199. package/dist/domain/serialization/serializationError.base.js +0 -1
  200. package/dist/domain/serialization/serializationError.limits.d.ts +51 -0
  201. package/dist/domain/serialization/serializationError.limits.js +70 -0
  202. package/dist/domain/serialization/serializationError.types.d.ts +0 -30
  203. package/dist/domain/serialization/serializationError.types.js +0 -50
  204. package/dist/domain/shared/domainError.helpers.d.ts +0 -1
  205. package/dist/domain/shared/domainError.helpers.js +0 -1
  206. package/dist/domain/state/conflict.error.d.ts +0 -1
  207. package/dist/domain/state/conflict.error.js +0 -1
  208. package/dist/domain/state/index.d.ts +0 -1
  209. package/dist/domain/state/index.js +0 -1
  210. package/dist/domain/state/notFound.error.d.ts +0 -1
  211. package/dist/domain/state/notFound.error.js +0 -1
  212. package/dist/domain/state/validation.error.d.ts +0 -1
  213. package/dist/domain/state/validation.error.js +0 -1
  214. package/dist/domain/state/validationError.base.d.ts +0 -1
  215. package/dist/domain/state/validationError.base.js +0 -1
  216. package/dist/domain/state/validationError.helpers.d.ts +0 -1
  217. package/dist/domain/state/validationError.helpers.js +0 -1
  218. package/dist/domain/transaction/index.d.ts +0 -1
  219. package/dist/domain/transaction/index.js +0 -1
  220. package/dist/domain/transaction/transactionError.base.d.ts +0 -1
  221. package/dist/domain/transaction/transactionError.base.js +0 -1
  222. package/dist/domain/transaction/transactionError.misc.d.ts +0 -1
  223. package/dist/domain/transaction/transactionError.misc.js +0 -1
  224. package/dist/domain/transaction/transactionError.types.d.ts +0 -1
  225. package/dist/domain/transaction/transactionError.types.js +0 -1
  226. package/dist/domain/traversal/index.d.ts +0 -1
  227. package/dist/domain/traversal/index.js +0 -1
  228. package/dist/domain/traversal/traversalLimit.error.d.ts +0 -1
  229. package/dist/domain/traversal/traversalLimit.error.js +0 -1
  230. package/dist/index.d.ts +0 -1
  231. package/dist/index.js +0 -1
  232. package/dist/infrastructure/adapter/adapter.error.d.ts +0 -1
  233. package/dist/infrastructure/adapter/adapter.error.js +0 -1
  234. package/dist/infrastructure/adapter/adapterError.base.d.ts +0 -1
  235. package/dist/infrastructure/adapter/adapterError.base.js +0 -1
  236. package/dist/infrastructure/adapter/adapterError.lifecycle.d.ts +0 -1
  237. package/dist/infrastructure/adapter/adapterError.lifecycle.js +0 -1
  238. package/dist/infrastructure/adapter/adapterError.operation.d.ts +0 -1
  239. package/dist/infrastructure/adapter/adapterError.operation.js +2 -3
  240. package/dist/infrastructure/adapter/index.d.ts +0 -1
  241. package/dist/infrastructure/adapter/index.js +0 -1
  242. package/dist/infrastructure/cache/cache.error.d.ts +0 -1
  243. package/dist/infrastructure/cache/cache.error.js +0 -1
  244. package/dist/infrastructure/cache/cacheError.base.d.ts +0 -1
  245. package/dist/infrastructure/cache/cacheError.base.js +0 -1
  246. package/dist/infrastructure/cache/cacheError.factory.d.ts +0 -1
  247. package/dist/infrastructure/cache/cacheError.factory.js +0 -1
  248. package/dist/infrastructure/cache/index.d.ts +0 -1
  249. package/dist/infrastructure/cache/index.js +0 -1
  250. package/dist/infrastructure/container/container.error.d.ts +0 -1
  251. package/dist/infrastructure/container/container.error.js +0 -1
  252. package/dist/infrastructure/container/containerError.base.d.ts +0 -1
  253. package/dist/infrastructure/container/containerError.base.js +0 -1
  254. package/dist/infrastructure/container/containerError.registration.d.ts +0 -1
  255. package/dist/infrastructure/container/containerError.registration.js +0 -1
  256. package/dist/infrastructure/container/index.d.ts +0 -1
  257. package/dist/infrastructure/container/index.js +0 -1
  258. package/dist/infrastructure/httpPipeline/httpMiddleware.error.d.ts +0 -1
  259. package/dist/infrastructure/httpPipeline/httpMiddleware.error.js +0 -1
  260. package/dist/infrastructure/httpPipeline/httpRequestGuard.error.d.ts +0 -1
  261. package/dist/infrastructure/httpPipeline/httpRequestGuard.error.js +0 -1
  262. package/dist/infrastructure/httpPipeline/index.d.ts +0 -1
  263. package/dist/infrastructure/httpPipeline/index.js +0 -1
  264. package/dist/infrastructure/index.d.ts +0 -1
  265. package/dist/infrastructure/index.js +0 -1
  266. package/dist/infrastructure/middleware/index.d.ts +0 -1
  267. package/dist/infrastructure/middleware/index.js +0 -1
  268. package/dist/infrastructure/middleware/middleware.error.d.ts +0 -1
  269. package/dist/infrastructure/middleware/middleware.error.js +3 -1
  270. package/dist/infrastructure/middleware/middlewareError.types.d.ts +8 -3
  271. package/dist/infrastructure/middleware/middlewareError.types.js +27 -4
  272. package/dist/infrastructure/network/http.error.d.ts +0 -1
  273. package/dist/infrastructure/network/http.error.js +0 -1
  274. package/dist/infrastructure/network/httpAdapter.error.d.ts +0 -1
  275. package/dist/infrastructure/network/httpAdapter.error.js +0 -1
  276. package/dist/infrastructure/network/httpClient.errors.d.ts +0 -1
  277. package/dist/infrastructure/network/httpClient.errors.js +0 -1
  278. package/dist/infrastructure/network/httpClientError.advanced.d.ts +0 -1
  279. package/dist/infrastructure/network/httpClientError.advanced.js +0 -1
  280. package/dist/infrastructure/network/httpClientError.base.d.ts +0 -1
  281. package/dist/infrastructure/network/httpClientError.base.js +0 -1
  282. package/dist/infrastructure/network/httpClientError.common.d.ts +0 -1
  283. package/dist/infrastructure/network/httpClientError.common.js +0 -1
  284. package/dist/infrastructure/network/httpClientError.error.d.ts +0 -1
  285. package/dist/infrastructure/network/httpClientError.error.js +0 -1
  286. package/dist/infrastructure/network/httpClientError.options.d.ts +0 -1
  287. package/dist/infrastructure/network/httpClientError.options.js +0 -1
  288. package/dist/infrastructure/network/httpClientError.specialized.d.ts +0 -1
  289. package/dist/infrastructure/network/httpClientError.specialized.js +0 -1
  290. package/dist/infrastructure/network/httpClientError.types.d.ts +0 -1
  291. package/dist/infrastructure/network/httpClientError.types.js +0 -1
  292. package/dist/infrastructure/network/httpError.base.d.ts +0 -1
  293. package/dist/infrastructure/network/httpError.base.js +0 -1
  294. package/dist/infrastructure/network/httpError.helpers.d.ts +0 -1
  295. package/dist/infrastructure/network/httpError.helpers.js +0 -1
  296. package/dist/infrastructure/network/httpResponse.error.d.ts +0 -1
  297. package/dist/infrastructure/network/httpResponse.error.js +0 -1
  298. package/dist/infrastructure/network/httpRouter.error.d.ts +0 -1
  299. package/dist/infrastructure/network/httpRouter.error.js +0 -1
  300. package/dist/infrastructure/network/httpRouterError.base.d.ts +0 -1
  301. package/dist/infrastructure/network/httpRouterError.base.js +0 -1
  302. package/dist/infrastructure/network/httpRouterError.types.d.ts +22 -2
  303. package/dist/infrastructure/network/httpRouterError.types.js +24 -4
  304. package/dist/infrastructure/network/httpServerError.error.d.ts +7 -1
  305. package/dist/infrastructure/network/httpServerError.error.js +8 -2
  306. package/dist/infrastructure/network/httpServerLifecycle.error.d.ts +0 -1
  307. package/dist/infrastructure/network/httpServerLifecycle.error.js +0 -1
  308. package/dist/infrastructure/network/httpServerLifecycleError.base.d.ts +0 -1
  309. package/dist/infrastructure/network/httpServerLifecycleError.base.js +0 -1
  310. package/dist/infrastructure/network/httpServerLifecycleError.types.d.ts +0 -1
  311. package/dist/infrastructure/network/httpServerLifecycleError.types.js +0 -1
  312. package/dist/infrastructure/network/httpStream.error.d.ts +0 -1
  313. package/dist/infrastructure/network/httpStream.error.js +0 -1
  314. package/dist/infrastructure/network/index.d.ts +0 -1
  315. package/dist/infrastructure/network/index.js +0 -1
  316. package/dist/infrastructure/network/network.error.d.ts +0 -1
  317. package/dist/infrastructure/network/network.error.js +0 -1
  318. package/dist/infrastructure/network/networkError.base.d.ts +0 -1
  319. package/dist/infrastructure/network/networkError.base.js +0 -1
  320. package/dist/infrastructure/network/networkError.factory.d.ts +0 -1
  321. package/dist/infrastructure/network/networkError.factory.js +0 -1
  322. package/dist/infrastructure/network/routePattern.error.d.ts +0 -1
  323. package/dist/infrastructure/network/routePattern.error.js +0 -1
  324. package/dist/infrastructure/network/timeout.error.d.ts +0 -1
  325. package/dist/infrastructure/network/timeout.error.js +0 -1
  326. package/dist/infrastructure/network/timeoutError.base.d.ts +0 -1
  327. package/dist/infrastructure/network/timeoutError.base.js +0 -1
  328. package/dist/infrastructure/network/timeoutError.factory.d.ts +0 -1
  329. package/dist/infrastructure/network/timeoutError.factory.js +0 -1
  330. package/dist/infrastructure/service/externalService.error.d.ts +0 -1
  331. package/dist/infrastructure/service/externalService.error.js +0 -1
  332. package/dist/infrastructure/service/externalServiceError.base.d.ts +9 -3
  333. package/dist/infrastructure/service/externalServiceError.base.js +20 -3
  334. package/dist/infrastructure/service/externalServiceError.factory.d.ts +0 -1
  335. package/dist/infrastructure/service/externalServiceError.factory.js +0 -1
  336. package/dist/infrastructure/service/index.d.ts +0 -1
  337. package/dist/infrastructure/service/index.js +0 -1
  338. package/dist/infrastructure/service/service.error.d.ts +0 -1
  339. package/dist/infrastructure/service/service.error.js +0 -1
  340. package/dist/infrastructure/service/serviceError.base.d.ts +0 -1
  341. package/dist/infrastructure/service/serviceError.base.js +0 -1
  342. package/dist/infrastructure/service/serviceError.factory.d.ts +0 -1
  343. package/dist/infrastructure/service/serviceError.factory.js +0 -1
  344. package/dist/infrastructure/storage/database.error.d.ts +0 -1
  345. package/dist/infrastructure/storage/database.error.js +0 -1
  346. package/dist/infrastructure/storage/databaseError.base.d.ts +0 -1
  347. package/dist/infrastructure/storage/databaseError.base.js +0 -1
  348. package/dist/infrastructure/storage/databaseError.factory.d.ts +0 -1
  349. package/dist/infrastructure/storage/databaseError.factory.js +0 -1
  350. package/dist/infrastructure/storage/index.d.ts +0 -1
  351. package/dist/infrastructure/storage/index.js +0 -1
  352. package/dist/infrastructure/storage/storage.error.d.ts +0 -1
  353. package/dist/infrastructure/storage/storage.error.js +0 -1
  354. package/dist/infrastructure/storage/storageError.base.d.ts +0 -1
  355. package/dist/infrastructure/storage/storageError.base.js +0 -1
  356. package/dist/infrastructure/storage/storageError.factory.d.ts +0 -1
  357. package/dist/infrastructure/storage/storageError.factory.js +0 -1
  358. package/dist/system/crypto.error.d.ts +0 -1
  359. package/dist/system/crypto.error.js +0 -1
  360. package/dist/system/cryptoError.base.d.ts +0 -1
  361. package/dist/system/cryptoError.base.js +0 -1
  362. package/dist/system/cryptoError.factory.d.ts +0 -1
  363. package/dist/system/cryptoError.factory.js +0 -1
  364. package/dist/system/index.d.ts +0 -1
  365. package/dist/system/index.js +0 -1
  366. package/dist/system/logging/index.d.ts +0 -1
  367. package/dist/system/logging/index.js +0 -1
  368. package/dist/system/logging/logging.error.d.ts +0 -1
  369. package/dist/system/logging/logging.error.js +0 -1
  370. package/dist/system/observability/index.d.ts +0 -1
  371. package/dist/system/observability/index.js +0 -1
  372. package/dist/system/observability/observabilityError.base.d.ts +0 -1
  373. package/dist/system/observability/observabilityError.base.js +0 -1
  374. package/dist/system/runtime.error.d.ts +0 -1
  375. package/dist/system/runtime.error.js +0 -1
  376. package/dist/system/runtimeError.base.d.ts +0 -1
  377. package/dist/system/runtimeError.base.js +0 -1
  378. package/dist/system/runtimeError.types.d.ts +0 -1
  379. package/dist/system/runtimeError.types.js +0 -1
  380. package/dist/system/system.error.d.ts +0 -1
  381. package/dist/system/system.error.js +0 -1
  382. package/dist/system/systemError.base.d.ts +0 -1
  383. package/dist/system/systemError.base.js +0 -1
  384. package/dist/system/systemError.factory.d.ts +0 -1
  385. package/dist/system/systemError.factory.js +0 -1
  386. package/dist/utils/errorHandler.core.d.ts +1 -1
  387. package/dist/utils/errorHandler.core.js +12 -12
  388. package/dist/utils/errorHandler.factory.d.ts +0 -1
  389. package/dist/utils/errorHandler.factory.js +0 -1
  390. package/dist/utils/errorHandler.types.d.ts +11 -4
  391. package/dist/utils/errorHandler.types.js +0 -1
  392. package/dist/utils/errorMapper.core.d.ts +0 -1
  393. package/dist/utils/errorMapper.core.js +0 -1
  394. package/dist/utils/errorMapper.mappers.d.ts +0 -1
  395. package/dist/utils/errorMapper.mappers.js +0 -1
  396. package/dist/utils/errorMapper.registry.d.ts +0 -1
  397. package/dist/utils/errorMapper.registry.js +0 -1
  398. package/dist/utils/errorMapper.types.d.ts +0 -1
  399. package/dist/utils/errorMapper.types.js +0 -1
  400. package/dist/utils/errorSerializer.core.d.ts +6 -4
  401. package/dist/utils/errorSerializer.core.js +17 -19
  402. package/dist/utils/errorSerializer.factory.d.ts +0 -1
  403. package/dist/utils/errorSerializer.factory.js +0 -1
  404. package/dist/utils/errorSerializer.public.d.ts +41 -0
  405. package/dist/utils/errorSerializer.public.js +54 -0
  406. package/dist/utils/errorSerializer.types.d.ts +19 -3
  407. package/dist/utils/errorSerializer.types.js +0 -1
  408. package/dist/utils/errorUtils.extraction.d.ts +0 -1
  409. package/dist/utils/errorUtils.extraction.js +0 -1
  410. package/dist/utils/errorUtils.helper.d.ts +0 -1
  411. package/dist/utils/errorUtils.helper.js +0 -1
  412. package/dist/utils/errorUtils.transform.d.ts +0 -1
  413. package/dist/utils/errorUtils.transform.js +0 -1
  414. package/dist/utils/errorUtils.typeCheck.d.ts +0 -1
  415. package/dist/utils/errorUtils.typeCheck.js +0 -1
  416. package/dist/utils/index.d.ts +0 -1
  417. package/dist/utils/index.js +0 -1
  418. package/package.json +1 -1
@@ -15,4 +15,3 @@ export * from "./httpServerLifecycle.error.js";
15
15
  export * from "./httpStream.error.js";
16
16
  export * from "./httpResponse.error.js";
17
17
  export * from "./routePattern.error.js";
18
- //# sourceMappingURL=index.js.map
@@ -4,4 +4,3 @@
4
4
  export { NetworkError, createNetworkError, isNetworkError, } from "./networkError.base.js";
5
5
  export type { NetworkErrorOptions } from "./networkError.base.js";
6
6
  export { connectionFailedError, networkTimeoutError, networkServiceUnavailableError, } from "./networkError.factory.js";
7
- //# sourceMappingURL=network.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export { NetworkError, createNetworkError, isNetworkError, } from "./networkError.base.js";
5
5
  export { connectionFailedError, networkTimeoutError, networkServiceUnavailableError, } from "./networkError.factory.js";
6
- //# sourceMappingURL=network.error.js.map
@@ -42,4 +42,3 @@ export declare class NetworkError extends BaseError {
42
42
  export declare function createNetworkError(message?: string, options?: NetworkErrorOptions): NetworkError;
43
43
  /** Determines whether an unknown value is a NetworkError. */
44
44
  export declare function isNetworkError(value: unknown): value is NetworkError;
45
- //# sourceMappingURL=networkError.base.d.ts.map
@@ -59,4 +59,3 @@ export function createNetworkError(message = "A network operation failed.", opti
59
59
  export function isNetworkError(value) {
60
60
  return value instanceof NetworkError;
61
61
  }
62
- //# sourceMappingURL=networkError.base.js.map
@@ -15,4 +15,3 @@ export declare function networkTimeoutError(service?: string, options?: Omit<Net
15
15
  * the name `networkServiceUnavailableError`.
16
16
  */
17
17
  export declare function networkServiceUnavailableError(service?: string, options?: Omit<NetworkErrorOptions, "service">): NetworkError;
18
- //# sourceMappingURL=networkError.factory.d.ts.map
@@ -41,4 +41,3 @@ export function networkServiceUnavailableError(service, options = {}) {
41
41
  service,
42
42
  });
43
43
  }
44
- //# sourceMappingURL=networkError.factory.js.map
@@ -42,4 +42,3 @@ export declare function createRoutePatternError(message: string, options?: Route
42
42
  * Determines whether an unknown value is a RoutePatternError.
43
43
  */
44
44
  export declare function isRoutePatternError(value: unknown): value is RoutePatternError;
45
- //# sourceMappingURL=routePattern.error.d.ts.map
@@ -68,4 +68,3 @@ export function createRoutePatternError(message, options = {}) {
68
68
  export function isRoutePatternError(value) {
69
69
  return value instanceof RoutePatternError;
70
70
  }
71
- //# sourceMappingURL=routePattern.error.js.map
@@ -4,4 +4,3 @@
4
4
  export { TimeoutError, createTimeoutError, isTimeoutError, TimeoutOperation, } from "./timeoutError.base.js";
5
5
  export type { TimeoutErrorOptions } from "./timeoutError.base.js";
6
6
  export { requestTimeoutError, databaseTimeoutError, serviceTimeoutError, lockTimeoutError, } from "./timeoutError.factory.js";
7
- //# sourceMappingURL=timeout.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export { TimeoutError, createTimeoutError, isTimeoutError, TimeoutOperation, } from "./timeoutError.base.js";
5
5
  export { requestTimeoutError, databaseTimeoutError, serviceTimeoutError, lockTimeoutError, } from "./timeoutError.factory.js";
6
- //# sourceMappingURL=timeout.error.js.map
@@ -58,4 +58,3 @@ export declare function isTimeoutError(value: unknown): value is TimeoutError;
58
58
  * resources and stay internal.
59
59
  */
60
60
  export declare function isPublicTimeoutOperation(operation: TimeoutOperation | undefined): boolean;
61
- //# sourceMappingURL=timeoutError.base.d.ts.map
@@ -85,4 +85,3 @@ function validateTimeout(timeoutMs) {
85
85
  throw new RangeError("timeoutMs must be a finite non-negative number.");
86
86
  }
87
87
  }
88
- //# sourceMappingURL=timeoutError.base.js.map
@@ -24,4 +24,3 @@ export declare function serviceTimeoutError(target?: string, timeoutMs?: number)
24
24
  /** Creates a lock acquisition timeout error. */
25
25
  export declare function lockTimeoutError(options?: TimeoutFactoryOptions): TimeoutError;
26
26
  export declare function lockTimeoutError(target?: string, timeoutMs?: number): TimeoutError;
27
- //# sourceMappingURL=timeoutError.factory.d.ts.map
@@ -58,4 +58,3 @@ export function lockTimeoutError(first, second) {
58
58
  statusCode: 409,
59
59
  });
60
60
  }
61
- //# sourceMappingURL=timeoutError.factory.js.map
@@ -4,4 +4,3 @@
4
4
  export { ExternalServiceError, createExternalServiceError, isExternalServiceError, } from "./externalServiceError.base.js";
5
5
  export type { ExternalServiceErrorOptions } from "./externalServiceError.base.js";
6
6
  export { externalServiceTimeoutError, externalServiceUnavailable, externalServiceUnavailableError, } from "./externalServiceError.factory.js";
7
- //# sourceMappingURL=externalService.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export { ExternalServiceError, createExternalServiceError, isExternalServiceError, } from "./externalServiceError.base.js";
5
5
  export { externalServiceTimeoutError, externalServiceUnavailable, externalServiceUnavailableError, } from "./externalServiceError.factory.js";
6
- //# sourceMappingURL=externalService.error.js.map
@@ -13,13 +13,20 @@ export interface ExternalServiceErrorOptions extends Omit<BaseErrorOptions, "cat
13
13
  readonly responseStatus?: number;
14
14
  readonly serviceCode?: string | number;
15
15
  }
16
- /** Error raised when an external dependency fails. */
16
+ /**
17
+ * Error raised when an external dependency fails.
18
+ *
19
+ * `options.service` is required by the type. A JavaScript caller (or a
20
+ * `catch` block re-throwing with only a message) that omits the options
21
+ * object gets `service: "unknown"` rather than a `TypeError` thrown from
22
+ * inside the error constructor, which hid the failure it was reporting.
23
+ */
17
24
  export declare class ExternalServiceError extends BaseError {
18
25
  readonly service: string;
19
26
  readonly operation?: string;
20
27
  readonly responseStatus?: number;
21
28
  readonly serviceCode?: string | number;
22
- constructor(message: string | undefined, options: ExternalServiceErrorOptions);
29
+ constructor(message?: string, options?: ExternalServiceErrorOptions);
23
30
  toJSON(): {
24
31
  name: string;
25
32
  message: string;
@@ -50,4 +57,3 @@ export declare function isExternalServiceError(value: unknown): value is Externa
50
57
  * can back off. Pass an explicit `statusCode` option to override.
51
58
  */
52
59
  export declare function mapResponseStatus(responseStatus: number | undefined): number;
53
- //# sourceMappingURL=externalServiceError.base.d.ts.map
@@ -5,13 +5,23 @@ import { BaseError } from "../../base/core/baseError.core.js";
5
5
  import { ErrorCategory } from "../../base/types/errorCategory.type.js";
6
6
  import { ErrorCode } from "../../base/types/errorCode.type.js";
7
7
  import { ErrorSeverity } from "../../base/types/errorSeverity.type.js";
8
- /** Error raised when an external dependency fails. */
8
+ /** Service name recorded when a caller supplies none. */
9
+ const UNKNOWN_SERVICE = "unknown";
10
+ /**
11
+ * Error raised when an external dependency fails.
12
+ *
13
+ * `options.service` is required by the type. A JavaScript caller (or a
14
+ * `catch` block re-throwing with only a message) that omits the options
15
+ * object gets `service: "unknown"` rather than a `TypeError` thrown from
16
+ * inside the error constructor, which hid the failure it was reporting.
17
+ */
9
18
  export class ExternalServiceError extends BaseError {
10
19
  service;
11
20
  operation;
12
21
  responseStatus;
13
22
  serviceCode;
14
- constructor(message = "An external service operation failed.", options) {
23
+ constructor(message = "An external service operation failed.", options = { service: UNKNOWN_SERVICE }) {
24
+ options = withService(options);
15
25
  super(message, {
16
26
  ...options,
17
27
  code: options.code ?? ErrorCode.EXTERNAL_SERVICE,
@@ -53,6 +63,14 @@ export class ExternalServiceError extends BaseError {
53
63
  };
54
64
  }
55
65
  }
66
+ /** Fills in the service name when the caller left the options incomplete. */
67
+ function withService(options) {
68
+ const partial = (options ?? {});
69
+ const service = typeof partial.service === "string" && partial.service.length > 0
70
+ ? partial.service
71
+ : UNKNOWN_SERVICE;
72
+ return { ...partial, service };
73
+ }
56
74
  /** Creates an external service error. */
57
75
  export function createExternalServiceError(service, message = "An external service operation failed.", options = {}) {
58
76
  return new ExternalServiceError(message, { ...options, service });
@@ -74,4 +92,3 @@ export function mapResponseStatus(responseStatus) {
74
92
  }
75
93
  return 502;
76
94
  }
77
- //# sourceMappingURL=externalServiceError.base.js.map
@@ -8,4 +8,3 @@ export declare function externalServiceTimeoutError(service: string, operation?:
8
8
  export declare function externalServiceUnavailableError(service: string, operation?: string): ExternalServiceError;
9
9
  /** @deprecated Use `externalServiceUnavailableError`. */
10
10
  export declare const externalServiceUnavailable: typeof externalServiceUnavailableError;
11
- //# sourceMappingURL=externalServiceError.factory.d.ts.map
@@ -31,4 +31,3 @@ export function externalServiceUnavailableError(service, operation) {
31
31
  }
32
32
  /** @deprecated Use `externalServiceUnavailableError`. */
33
33
  export const externalServiceUnavailable = externalServiceUnavailableError;
34
- //# sourceMappingURL=externalServiceError.factory.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export * from "./service.error.js";
7
7
  export * from "./externalService.error.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export * from "./service.error.js";
7
7
  export * from "./externalService.error.js";
8
- //# sourceMappingURL=index.js.map
@@ -4,4 +4,3 @@
4
4
  export { ServiceError, createServiceError, isServiceError, } from "./serviceError.base.js";
5
5
  export type { ServiceErrorOptions } from "./serviceError.base.js";
6
6
  export { serviceUnavailableError, serviceInitializationError, serviceOperationError, } from "./serviceError.factory.js";
7
- //# sourceMappingURL=service.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export { ServiceError, createServiceError, isServiceError, } from "./serviceError.base.js";
5
5
  export { serviceUnavailableError, serviceInitializationError, serviceOperationError, } from "./serviceError.factory.js";
6
- //# sourceMappingURL=service.error.js.map
@@ -36,4 +36,3 @@ export declare class ServiceError extends BaseError {
36
36
  export declare function createServiceError(message?: string, options?: ServiceErrorOptions): ServiceError;
37
37
  /** Determines whether an unknown value is a ServiceError. */
38
38
  export declare function isServiceError(value: unknown): value is ServiceError;
39
- //# sourceMappingURL=serviceError.base.d.ts.map
@@ -45,4 +45,3 @@ export function createServiceError(message = "A service operation failed.", opti
45
45
  export function isServiceError(value) {
46
46
  return value instanceof ServiceError;
47
47
  }
48
- //# sourceMappingURL=serviceError.base.js.map
@@ -8,4 +8,3 @@ export declare function serviceUnavailableError(service?: string): ServiceError;
8
8
  export declare function serviceInitializationError(service?: string, cause?: unknown): ServiceError;
9
9
  /** Creates a service operation failure. */
10
10
  export declare function serviceOperationError(operation: string, service?: string): ServiceError;
11
- //# sourceMappingURL=serviceError.factory.d.ts.map
@@ -40,4 +40,3 @@ export function serviceOperationError(operation, service) {
40
40
  statusCode: 500,
41
41
  });
42
42
  }
43
- //# sourceMappingURL=serviceError.factory.js.map
@@ -4,4 +4,3 @@
4
4
  export { DatabaseError, createDatabaseError, isDatabaseError, DatabaseOperation, } from "./databaseError.base.js";
5
5
  export type { DatabaseErrorOptions } from "./databaseError.base.js";
6
6
  export { databaseConnectionError, databaseQueryError, databaseTransactionError, databaseMigrationError, } from "./databaseError.factory.js";
7
- //# sourceMappingURL=database.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export { DatabaseError, createDatabaseError, isDatabaseError, DatabaseOperation, } from "./databaseError.base.js";
5
5
  export { databaseConnectionError, databaseQueryError, databaseTransactionError, databaseMigrationError, } from "./databaseError.factory.js";
6
- //# sourceMappingURL=database.error.js.map
@@ -51,4 +51,3 @@ export declare class DatabaseError extends BaseError {
51
51
  export declare function createDatabaseError(message?: string, options?: DatabaseErrorOptions): DatabaseError;
52
52
  /** Determines whether an unknown value is a DatabaseError. */
53
53
  export declare function isDatabaseError(value: unknown): value is DatabaseError;
54
- //# sourceMappingURL=databaseError.base.d.ts.map
@@ -66,4 +66,3 @@ export function createDatabaseError(message = "A database operation failed.", op
66
66
  export function isDatabaseError(value) {
67
67
  return value instanceof DatabaseError;
68
68
  }
69
- //# sourceMappingURL=databaseError.base.js.map
@@ -10,4 +10,3 @@ export declare function databaseQueryError(message?: string, options?: Omit<Data
10
10
  export declare function databaseTransactionError(message?: string, options?: Omit<DatabaseErrorOptions, "operation">): DatabaseError;
11
11
  /** Creates a database migration error. */
12
12
  export declare function databaseMigrationError(message?: string, options?: Omit<DatabaseErrorOptions, "operation">): DatabaseError;
13
- //# sourceMappingURL=databaseError.factory.d.ts.map
@@ -35,4 +35,3 @@ export function databaseMigrationError(message = "The database migration failed.
35
35
  operation: DatabaseOperation.MIGRATION,
36
36
  });
37
37
  }
38
- //# sourceMappingURL=databaseError.factory.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export * from "./database.error.js";
7
7
  export * from "./storage.error.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export * from "./database.error.js";
7
7
  export * from "./storage.error.js";
8
- //# sourceMappingURL=index.js.map
@@ -4,4 +4,3 @@
4
4
  export { StorageError, createStorageError, isStorageError, StorageOperation, } from "./storageError.base.js";
5
5
  export type { StorageErrorOptions } from "./storageError.base.js";
6
6
  export { storageReadError, storageWriteError, storageUploadError, storageDownloadError, storageDeleteError, storageNotFoundError, } from "./storageError.factory.js";
7
- //# sourceMappingURL=storage.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export { StorageError, createStorageError, isStorageError, StorageOperation, } from "./storageError.base.js";
5
5
  export { storageReadError, storageWriteError, storageUploadError, storageDownloadError, storageDeleteError, storageNotFoundError, } from "./storageError.factory.js";
6
- //# sourceMappingURL=storage.error.js.map
@@ -52,4 +52,3 @@ export declare class StorageError extends BaseError {
52
52
  export declare function createStorageError(message?: string, options?: StorageErrorOptions): StorageError;
53
53
  /** Determines whether an unknown value is a StorageError. */
54
54
  export declare function isStorageError(value: unknown): value is StorageError;
55
- //# sourceMappingURL=storageError.base.d.ts.map
@@ -67,4 +67,3 @@ export function createStorageError(message = "A storage operation failed.", opti
67
67
  export function isStorageError(value) {
68
68
  return value instanceof StorageError;
69
69
  }
70
- //# sourceMappingURL=storageError.base.js.map
@@ -14,4 +14,3 @@ export declare function storageDownloadError(resource: string, provider?: string
14
14
  export declare function storageDeleteError(resource: string, provider?: string, cause?: unknown): StorageError;
15
15
  /** Creates a storage not found error. */
16
16
  export declare function storageNotFoundError(resource: string, provider?: string): StorageError;
17
- //# sourceMappingURL=storageError.factory.d.ts.map
@@ -64,4 +64,3 @@ export function storageNotFoundError(resource, provider) {
64
64
  expose: true,
65
65
  });
66
66
  }
67
- //# sourceMappingURL=storageError.factory.js.map
@@ -4,4 +4,3 @@
4
4
  export { CryptoError, createCryptoError, isCryptoError, CryptoOperation, } from "./cryptoError.base.js";
5
5
  export type { CryptoErrorOptions } from "./cryptoError.base.js";
6
6
  export { cryptoHashError, cryptoCipherError, cryptoSignatureError, cryptoKeyDerivationError, cryptoKeyError, } from "./cryptoError.factory.js";
7
- //# sourceMappingURL=crypto.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export { CryptoError, createCryptoError, isCryptoError, CryptoOperation, } from "./cryptoError.base.js";
5
5
  export { cryptoHashError, cryptoCipherError, cryptoSignatureError, cryptoKeyDerivationError, cryptoKeyError, } from "./cryptoError.factory.js";
6
- //# sourceMappingURL=crypto.error.js.map
@@ -53,4 +53,3 @@ export declare class CryptoError extends BaseError {
53
53
  export declare function createCryptoError(message?: string, options?: CryptoErrorOptions): CryptoError;
54
54
  /** Determines whether an unknown value is a CryptoError. */
55
55
  export declare function isCryptoError(value: unknown): value is CryptoError;
56
- //# sourceMappingURL=cryptoError.base.d.ts.map
@@ -65,4 +65,3 @@ export function createCryptoError(message = "A cryptographic operation failed.",
65
65
  export function isCryptoError(value) {
66
66
  return value instanceof CryptoError;
67
67
  }
68
- //# sourceMappingURL=cryptoError.base.js.map
@@ -12,4 +12,3 @@ export declare function cryptoSignatureError(message?: string, operation?: Crypt
12
12
  export declare function cryptoKeyDerivationError(message?: string, algorithm?: string): CryptoError;
13
13
  /** Creates a cryptographic key error. */
14
14
  export declare function cryptoKeyError(message?: string, operation?: CryptoOperation.KEY_GENERATION | CryptoOperation.KEY_IMPORT | CryptoOperation.KEY_EXPORT, algorithm?: string): CryptoError;
15
- //# sourceMappingURL=cryptoError.factory.d.ts.map
@@ -46,4 +46,3 @@ export function cryptoKeyError(message = "Cryptographic key operation failed.",
46
46
  algorithm,
47
47
  });
48
48
  }
49
- //# sourceMappingURL=cryptoError.factory.js.map
@@ -8,4 +8,3 @@ export * from "./system.error.js";
8
8
  export * from "./runtime.error.js";
9
9
  export * from "./logging/index.js";
10
10
  export * from "./observability/index.js";
11
- //# sourceMappingURL=index.d.ts.map
@@ -8,4 +8,3 @@ export * from "./system.error.js";
8
8
  export * from "./runtime.error.js";
9
9
  export * from "./logging/index.js";
10
10
  export * from "./observability/index.js";
11
- //# sourceMappingURL=index.js.map
@@ -4,4 +4,3 @@
4
4
  * Logging subsystem error types.
5
5
  */
6
6
  export * from "./logging.error.js";
7
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Logging subsystem error types.
5
5
  */
6
6
  export * from "./logging.error.js";
7
- //# sourceMappingURL=index.js.map
@@ -21,4 +21,3 @@ export declare function createLoggingError(message: string, options?: LoggingErr
21
21
  * Determines whether an unknown value is a LoggingError.
22
22
  */
23
23
  export declare function isLoggingError(value: unknown): value is LoggingError;
24
- //# sourceMappingURL=logging.error.d.ts.map
@@ -30,4 +30,3 @@ export function createLoggingError(message, options = {}) {
30
30
  export function isLoggingError(value) {
31
31
  return value instanceof LoggingError;
32
32
  }
33
- //# sourceMappingURL=logging.error.js.map
@@ -4,4 +4,3 @@
4
4
  * Telemetry (metrics, tracing, exporter) errors.
5
5
  */
6
6
  export * from "./observabilityError.base.js";
7
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Telemetry (metrics, tracing, exporter) errors.
5
5
  */
6
6
  export * from "./observabilityError.base.js";
7
- //# sourceMappingURL=index.js.map
@@ -13,4 +13,3 @@ export interface ObservabilityErrorOptions {
13
13
  export declare class ObservabilityError extends BaseError {
14
14
  constructor(message: string, options?: ObservabilityErrorOptions);
15
15
  }
16
- //# sourceMappingURL=observabilityError.base.d.ts.map
@@ -20,4 +20,3 @@ export class ObservabilityError extends BaseError {
20
20
  this.name = "ObservabilityError";
21
21
  }
22
22
  }
23
- //# sourceMappingURL=observabilityError.base.js.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export * from "./runtimeError.base.js";
5
5
  export * from "./runtimeError.types.js";
6
- //# sourceMappingURL=runtime.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export * from "./runtimeError.base.js";
5
5
  export * from "./runtimeError.types.js";
6
- //# sourceMappingURL=runtime.error.js.map
@@ -37,4 +37,3 @@ export declare class RuntimeError extends BaseError {
37
37
  export declare function createRuntimeError(message: string, options?: RuntimeErrorOptions): RuntimeError;
38
38
  /** Determines whether an unknown value is a RuntimeError. */
39
39
  export declare function isRuntimeError(value: unknown): value is RuntimeError;
40
- //# sourceMappingURL=runtimeError.base.d.ts.map
@@ -37,4 +37,3 @@ export function createRuntimeError(message, options = {}) {
37
37
  export function isRuntimeError(value) {
38
38
  return value instanceof RuntimeError;
39
39
  }
40
- //# sourceMappingURL=runtimeError.base.js.map
@@ -29,4 +29,3 @@ export declare class RuntimeEnvironmentError extends RuntimeError {
29
29
  export declare class RuntimeManagerError extends RuntimeError {
30
30
  constructor(message: string, cause?: unknown);
31
31
  }
32
- //# sourceMappingURL=runtimeError.types.d.ts.map
@@ -65,4 +65,3 @@ export class RuntimeManagerError extends RuntimeError {
65
65
  });
66
66
  }
67
67
  }
68
- //# sourceMappingURL=runtimeError.types.js.map
@@ -4,4 +4,3 @@
4
4
  export { SystemError, createSystemError, isSystemError, SystemOperation, } from "./systemError.base.js";
5
5
  export type { SystemErrorOptions } from "./systemError.base.js";
6
6
  export { systemInitializationError, systemStartupError, systemShutdownError, internalSystemError, } from "./systemError.factory.js";
7
- //# sourceMappingURL=system.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export { SystemError, createSystemError, isSystemError, SystemOperation, } from "./systemError.base.js";
5
5
  export { systemInitializationError, systemStartupError, systemShutdownError, internalSystemError, } from "./systemError.factory.js";
6
- //# sourceMappingURL=system.error.js.map
@@ -42,4 +42,3 @@ export declare class SystemError extends BaseError {
42
42
  export declare function createSystemError(message?: string, options?: SystemErrorOptions): SystemError;
43
43
  /** Determines whether an unknown value is a SystemError. */
44
44
  export declare function isSystemError(value: unknown): value is SystemError;
45
- //# sourceMappingURL=systemError.base.d.ts.map
@@ -51,4 +51,3 @@ export function createSystemError(message = "A system operation failed.", option
51
51
  export function isSystemError(value) {
52
52
  return value instanceof SystemError;
53
53
  }
54
- //# sourceMappingURL=systemError.base.js.map
@@ -10,4 +10,3 @@ export declare function systemStartupError(message: string, cause?: unknown): Sy
10
10
  export declare function systemShutdownError(message: string, cause?: unknown): SystemError;
11
11
  /** Creates an internal system error. */
12
12
  export declare function internalSystemError(message: string, cause?: unknown): SystemError;
13
- //# sourceMappingURL=systemError.factory.d.ts.map
@@ -39,4 +39,3 @@ export function internalSystemError(message, cause) {
39
39
  isOperational: false,
40
40
  });
41
41
  }
42
- //# sourceMappingURL=systemError.factory.js.map
@@ -13,6 +13,7 @@ export declare class ErrorHandler {
13
13
  private readonly defaultMessage;
14
14
  private readonly includeStack;
15
15
  private readonly publicMetadataKeys;
16
+ private readonly exposeMetadata;
16
17
  private readonly sensitiveKeyPattern;
17
18
  constructor(options?: ErrorHandlerOptions);
18
19
  /** Converts an unknown thrown value into a BaseError. */
@@ -61,4 +62,3 @@ export declare class ErrorHandler {
61
62
  /** Removes obviously sensitive fields from metadata (recursively). */
62
63
  private redact;
63
64
  }
64
- //# sourceMappingURL=errorHandler.core.d.ts.map
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * Centralized error normalization, serialization, and reporting service.
3
3
  */
4
- import { pickErrorMetadata, redactErrorMetadata, serializeErrorMetadata, } from "../base/core/errorMetadata.core.js";
4
+ import { redactErrorMetadata, serializeErrorMetadata, } from "../base/core/errorMetadata.core.js";
5
5
  import { isBaseError, normalizeUnknownToBaseError, } from "../base/utils/baseError.utils.js";
6
6
  import { ErrorSerializer } from "./errorSerializer.core.js";
7
+ import { selectPublicIssues, selectPublicMetadata, } from "./errorSerializer.public.js";
7
8
  export { createErrorHandler, normalizeError, isHandledError, } from "./errorHandler.factory.js";
8
9
  /** Centralized error normalization, serialization, and reporting service. */
9
10
  export class ErrorHandler {
@@ -13,6 +14,7 @@ export class ErrorHandler {
13
14
  defaultMessage;
14
15
  includeStack;
15
16
  publicMetadataKeys;
17
+ exposeMetadata;
16
18
  sensitiveKeyPattern;
17
19
  constructor(options = {}) {
18
20
  this.reporter = options.reporter;
@@ -22,6 +24,7 @@ export class ErrorHandler {
22
24
  options.defaultMessage ?? "An unexpected error occurred.";
23
25
  this.includeStack = options.includeStack ?? false;
24
26
  this.publicMetadataKeys = options.publicMetadataKeys;
27
+ this.exposeMetadata = options.exposeMetadata ?? false;
25
28
  this.sensitiveKeyPattern = options.sensitiveKeyPattern;
26
29
  }
27
30
  /** Converts an unknown thrown value into a BaseError. */
@@ -88,13 +91,12 @@ export class ErrorHandler {
88
91
  * fields and non-exposed metadata are never revealed.
89
92
  */
90
93
  toPublicResult(error, context) {
91
- let details;
92
- if (this.publicMetadataKeys !== undefined) {
93
- details = this.redact(pickErrorMetadata(error.metadata, this.publicMetadataKeys));
94
- }
95
- else if (error.expose) {
96
- details = this.redact(error.metadata);
97
- }
94
+ const details = selectPublicMetadata(error, {
95
+ publicMetadataKeys: this.publicMetadataKeys,
96
+ exposeMetadata: this.exposeMetadata,
97
+ sensitiveKeyPattern: this.sensitiveKeyPattern,
98
+ });
99
+ const issues = selectPublicIssues(error);
98
100
  return {
99
101
  code: error.code,
100
102
  message: error.expose ? error.message : this.defaultMessage,
@@ -103,9 +105,8 @@ export class ErrorHandler {
103
105
  ...(context?.correlationId
104
106
  ? { correlationId: context.correlationId }
105
107
  : {}),
106
- ...(details !== undefined && Object.keys(details).length > 0
107
- ? { details }
108
- : {}),
108
+ ...(details !== undefined ? { details } : {}),
109
+ ...(issues !== undefined ? { issues } : {}),
109
110
  };
110
111
  }
111
112
  /** Reports an error without producing a response. */
@@ -174,4 +175,3 @@ export class ErrorHandler {
174
175
  });
175
176
  }
176
177
  }
177
- //# sourceMappingURL=errorHandler.core.js.map
@@ -10,4 +10,3 @@ export declare function createErrorHandler(options?: ErrorHandlerOptions): Error
10
10
  export declare function normalizeError(value: unknown): BaseError;
11
11
  /** Determines whether an unknown value is a supported BaseError. */
12
12
  export declare function isHandledError(value: unknown): value is BaseError;
13
- //# sourceMappingURL=errorHandler.factory.d.ts.map
@@ -15,4 +15,3 @@ export function normalizeError(value) {
15
15
  export function isHandledError(value) {
16
16
  return isBaseError(value);
17
17
  }
18
- //# sourceMappingURL=errorHandler.factory.js.map