@zudojs/errors 1.3.2 → 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 (417) hide show
  1. package/dist/base/core/baseError.core.d.ts +6 -1
  2. package/dist/base/core/baseError.core.js +6 -1
  3. package/dist/base/core/baseError.serialize.d.ts +0 -1
  4. package/dist/base/core/baseError.serialize.js +0 -1
  5. package/dist/base/core/errorCause.redact.d.ts +0 -1
  6. package/dist/base/core/errorCause.redact.js +0 -1
  7. package/dist/base/core/errorMetadata.core.d.ts +0 -1
  8. package/dist/base/core/errorMetadata.core.js +0 -1
  9. package/dist/base/core/errorMetadata.type.d.ts +0 -1
  10. package/dist/base/core/errorMetadata.type.js +0 -1
  11. package/dist/base/core/index.d.ts +0 -1
  12. package/dist/base/core/index.js +0 -1
  13. package/dist/base/index.d.ts +0 -1
  14. package/dist/base/index.js +0 -1
  15. package/dist/base/types/baseError.type.d.ts +6 -1
  16. package/dist/base/types/baseError.type.js +0 -1
  17. package/dist/base/types/errorCategory.enum.d.ts +0 -1
  18. package/dist/base/types/errorCategory.enum.js +0 -1
  19. package/dist/base/types/errorCategory.helpers.d.ts +0 -1
  20. package/dist/base/types/errorCategory.helpers.js +0 -1
  21. package/dist/base/types/errorCategory.type.d.ts +0 -1
  22. package/dist/base/types/errorCategory.type.js +0 -1
  23. package/dist/base/types/errorCode.type.d.ts +0 -1
  24. package/dist/base/types/errorCode.type.js +0 -1
  25. package/dist/base/types/errorSeverity.type.d.ts +0 -1
  26. package/dist/base/types/errorSeverity.type.js +0 -1
  27. package/dist/base/types/index.d.ts +0 -1
  28. package/dist/base/types/index.js +0 -1
  29. package/dist/base/utils/baseError.utils.d.ts +0 -1
  30. package/dist/base/utils/baseError.utils.js +0 -1
  31. package/dist/base/utils/index.d.ts +0 -1
  32. package/dist/base/utils/index.js +0 -1
  33. package/dist/domain/access/authError.base.d.ts +0 -1
  34. package/dist/domain/access/authError.base.js +0 -1
  35. package/dist/domain/access/authentication.error.d.ts +0 -1
  36. package/dist/domain/access/authentication.error.js +0 -1
  37. package/dist/domain/access/authorization.error.d.ts +0 -1
  38. package/dist/domain/access/authorization.error.js +0 -1
  39. package/dist/domain/access/index.d.ts +0 -1
  40. package/dist/domain/access/index.js +0 -1
  41. package/dist/domain/access/oauthError.base.d.ts +0 -1
  42. package/dist/domain/access/oauthError.base.js +0 -1
  43. package/dist/domain/access/rateLimit.error.d.ts +0 -1
  44. package/dist/domain/access/rateLimit.error.js +0 -1
  45. package/dist/domain/api/api.error.d.ts +0 -1
  46. package/dist/domain/api/api.error.js +0 -1
  47. package/dist/domain/api/apiError.base.d.ts +0 -1
  48. package/dist/domain/api/apiError.base.js +0 -1
  49. package/dist/domain/api/apiError.lifecycle.d.ts +0 -1
  50. package/dist/domain/api/apiError.lifecycle.js +0 -1
  51. package/dist/domain/api/apiError.routing.d.ts +0 -1
  52. package/dist/domain/api/apiError.routing.js +0 -1
  53. package/dist/domain/api/index.d.ts +0 -1
  54. package/dist/domain/api/index.js +0 -1
  55. package/dist/domain/app/application.error.d.ts +0 -1
  56. package/dist/domain/app/application.error.js +0 -1
  57. package/dist/domain/app/configuration.error.d.ts +0 -1
  58. package/dist/domain/app/configuration.error.js +0 -1
  59. package/dist/domain/app/domain.error.d.ts +0 -1
  60. package/dist/domain/app/domain.error.js +0 -1
  61. package/dist/domain/app/index.d.ts +0 -1
  62. package/dist/domain/app/index.js +0 -1
  63. package/dist/domain/app/lifecycle.error.d.ts +0 -1
  64. package/dist/domain/app/lifecycle.error.js +0 -1
  65. package/dist/domain/app/lifecycleError.base.d.ts +0 -1
  66. package/dist/domain/app/lifecycleError.base.js +0 -1
  67. package/dist/domain/app/lifecycleError.types.d.ts +0 -1
  68. package/dist/domain/app/lifecycleError.types.js +0 -1
  69. package/dist/domain/app/module.error.d.ts +0 -1
  70. package/dist/domain/app/module.error.js +0 -1
  71. package/dist/domain/app/moduleError.base.d.ts +0 -1
  72. package/dist/domain/app/moduleError.base.js +0 -1
  73. package/dist/domain/app/moduleError.types.d.ts +0 -1
  74. package/dist/domain/app/moduleError.types.js +0 -1
  75. package/dist/domain/body/bodyParser.error.d.ts +0 -1
  76. package/dist/domain/body/bodyParser.error.js +0 -1
  77. package/dist/domain/body/httpBody.error.d.ts +0 -1
  78. package/dist/domain/body/httpBody.error.js +0 -1
  79. package/dist/domain/body/httpBodyError.base.d.ts +0 -1
  80. package/dist/domain/body/httpBodyError.base.js +0 -1
  81. package/dist/domain/body/httpBodyError.types.d.ts +0 -1
  82. package/dist/domain/body/httpBodyError.types.js +0 -1
  83. package/dist/domain/body/httpFormData.error.d.ts +0 -1
  84. package/dist/domain/body/httpFormData.error.js +0 -1
  85. package/dist/domain/body/index.d.ts +0 -1
  86. package/dist/domain/body/index.js +0 -1
  87. package/dist/domain/body/multipart.error.d.ts +0 -1
  88. package/dist/domain/body/multipart.error.js +0 -1
  89. package/dist/domain/cli/cliError.base.d.ts +0 -1
  90. package/dist/domain/cli/cliError.base.js +0 -1
  91. package/dist/domain/cli/index.d.ts +0 -1
  92. package/dist/domain/cli/index.js +0 -1
  93. package/dist/domain/constant/constantError.base.d.ts +0 -1
  94. package/dist/domain/constant/constantError.base.js +0 -1
  95. package/dist/domain/constant/index.d.ts +0 -1
  96. package/dist/domain/constant/index.js +0 -1
  97. package/dist/domain/cqrs/cqrsError.base.d.ts +0 -1
  98. package/dist/domain/cqrs/cqrsError.base.js +0 -1
  99. package/dist/domain/cqrs/cqrsError.result.d.ts +0 -1
  100. package/dist/domain/cqrs/cqrsError.result.js +0 -1
  101. package/dist/domain/cqrs/index.d.ts +0 -1
  102. package/dist/domain/cqrs/index.js +0 -1
  103. package/dist/domain/documentation/documentation.error.d.ts +0 -1
  104. package/dist/domain/documentation/documentation.error.js +0 -1
  105. package/dist/domain/documentation/documentationError.base.d.ts +0 -1
  106. package/dist/domain/documentation/documentationError.base.js +0 -1
  107. package/dist/domain/documentation/documentationError.types.d.ts +0 -1
  108. package/dist/domain/documentation/documentationError.types.js +0 -1
  109. package/dist/domain/documentation/index.d.ts +0 -1
  110. package/dist/domain/documentation/index.js +0 -1
  111. package/dist/domain/event/event.error.d.ts +0 -1
  112. package/dist/domain/event/event.error.js +0 -1
  113. package/dist/domain/event/eventError.base.d.ts +0 -1
  114. package/dist/domain/event/eventError.base.js +0 -1
  115. package/dist/domain/event/eventError.handler.d.ts +0 -1
  116. package/dist/domain/event/eventError.handler.js +0 -1
  117. package/dist/domain/event/eventError.lifecycle.d.ts +0 -1
  118. package/dist/domain/event/eventError.lifecycle.js +0 -1
  119. package/dist/domain/event/eventError.serialization.d.ts +0 -1
  120. package/dist/domain/event/eventError.serialization.js +0 -1
  121. package/dist/domain/event/index.d.ts +0 -1
  122. package/dist/domain/event/index.js +0 -1
  123. package/dist/domain/index.d.ts +0 -1
  124. package/dist/domain/index.js +0 -1
  125. package/dist/domain/message/index.d.ts +0 -1
  126. package/dist/domain/message/index.js +0 -1
  127. package/dist/domain/message/message.error.d.ts +0 -1
  128. package/dist/domain/message/message.error.js +0 -1
  129. package/dist/domain/message/messageError.base.d.ts +0 -1
  130. package/dist/domain/message/messageError.base.js +0 -1
  131. package/dist/domain/message/messageError.handler.d.ts +0 -1
  132. package/dist/domain/message/messageError.handler.js +0 -1
  133. package/dist/domain/message/messageError.lifecycle.d.ts +0 -1
  134. package/dist/domain/message/messageError.lifecycle.js +0 -1
  135. package/dist/domain/message/messageError.serialization.d.ts +0 -1
  136. package/dist/domain/message/messageError.serialization.js +0 -1
  137. package/dist/domain/message/messageError.validation.d.ts +0 -1
  138. package/dist/domain/message/messageError.validation.js +0 -1
  139. package/dist/domain/openapi/index.d.ts +0 -1
  140. package/dist/domain/openapi/index.js +0 -1
  141. package/dist/domain/openapi/openApiError.base.d.ts +0 -1
  142. package/dist/domain/openapi/openApiError.base.js +0 -1
  143. package/dist/domain/plugin/index.d.ts +0 -1
  144. package/dist/domain/plugin/index.js +0 -1
  145. package/dist/domain/plugin/plugin.error.d.ts +0 -1
  146. package/dist/domain/plugin/plugin.error.js +0 -1
  147. package/dist/domain/plugin/pluginError.base.d.ts +0 -1
  148. package/dist/domain/plugin/pluginError.base.js +0 -1
  149. package/dist/domain/plugin/pluginError.lifecycle.d.ts +0 -1
  150. package/dist/domain/plugin/pluginError.lifecycle.js +0 -1
  151. package/dist/domain/plugin/pluginError.runtime.d.ts +0 -1
  152. package/dist/domain/plugin/pluginError.runtime.js +0 -1
  153. package/dist/domain/queue/index.d.ts +0 -1
  154. package/dist/domain/queue/index.js +0 -1
  155. package/dist/domain/queue/queue.error.d.ts +0 -1
  156. package/dist/domain/queue/queue.error.js +0 -1
  157. package/dist/domain/queue/queueError.base.d.ts +0 -1
  158. package/dist/domain/queue/queueError.base.js +0 -1
  159. package/dist/domain/queue/queueError.job.d.ts +0 -1
  160. package/dist/domain/queue/queueError.job.js +0 -1
  161. package/dist/domain/queue/queueError.queue.d.ts +0 -1
  162. package/dist/domain/queue/queueError.queue.js +0 -1
  163. package/dist/domain/queue/queueError.worker.d.ts +0 -1
  164. package/dist/domain/queue/queueError.worker.js +0 -1
  165. package/dist/domain/rpc/index.d.ts +0 -1
  166. package/dist/domain/rpc/index.js +0 -1
  167. package/dist/domain/rpc/rpc.error.d.ts +0 -1
  168. package/dist/domain/rpc/rpc.error.js +0 -1
  169. package/dist/domain/rpc/rpcError.base.d.ts +0 -1
  170. package/dist/domain/rpc/rpcError.base.js +0 -1
  171. package/dist/domain/rpc/rpcError.protocol.d.ts +0 -1
  172. package/dist/domain/rpc/rpcError.protocol.js +0 -1
  173. package/dist/domain/rpc/rpcError.transport.d.ts +0 -1
  174. package/dist/domain/rpc/rpcError.transport.js +0 -1
  175. package/dist/domain/scheduler/index.d.ts +0 -1
  176. package/dist/domain/scheduler/index.js +0 -1
  177. package/dist/domain/scheduler/scheduler.error.d.ts +0 -1
  178. package/dist/domain/scheduler/scheduler.error.js +0 -1
  179. package/dist/domain/scheduler/schedulerError.base.d.ts +0 -1
  180. package/dist/domain/scheduler/schedulerError.base.js +0 -1
  181. package/dist/domain/scheduler/schedulerError.execution.d.ts +0 -1
  182. package/dist/domain/scheduler/schedulerError.execution.js +0 -1
  183. package/dist/domain/scheduler/schedulerError.schedule.d.ts +0 -1
  184. package/dist/domain/scheduler/schedulerError.schedule.js +0 -1
  185. package/dist/domain/schema/index.d.ts +0 -1
  186. package/dist/domain/schema/index.js +0 -1
  187. package/dist/domain/schema/schema.error.d.ts +0 -1
  188. package/dist/domain/schema/schema.error.js +0 -1
  189. package/dist/domain/schema/schemaError.base.d.ts +0 -1
  190. package/dist/domain/schema/schemaError.base.js +0 -1
  191. package/dist/domain/schema/schemaError.types.d.ts +0 -1
  192. package/dist/domain/schema/schemaError.types.js +0 -1
  193. package/dist/domain/serialization/index.d.ts +0 -1
  194. package/dist/domain/serialization/index.js +0 -1
  195. package/dist/domain/serialization/serialization.error.d.ts +0 -1
  196. package/dist/domain/serialization/serialization.error.js +0 -1
  197. package/dist/domain/serialization/serializationError.base.d.ts +0 -1
  198. package/dist/domain/serialization/serializationError.base.js +0 -1
  199. package/dist/domain/serialization/serializationError.limits.d.ts +0 -1
  200. package/dist/domain/serialization/serializationError.limits.js +0 -1
  201. package/dist/domain/serialization/serializationError.types.d.ts +0 -1
  202. package/dist/domain/serialization/serializationError.types.js +0 -1
  203. package/dist/domain/shared/domainError.helpers.d.ts +0 -1
  204. package/dist/domain/shared/domainError.helpers.js +0 -1
  205. package/dist/domain/state/conflict.error.d.ts +0 -1
  206. package/dist/domain/state/conflict.error.js +0 -1
  207. package/dist/domain/state/index.d.ts +0 -1
  208. package/dist/domain/state/index.js +0 -1
  209. package/dist/domain/state/notFound.error.d.ts +0 -1
  210. package/dist/domain/state/notFound.error.js +0 -1
  211. package/dist/domain/state/validation.error.d.ts +0 -1
  212. package/dist/domain/state/validation.error.js +0 -1
  213. package/dist/domain/state/validationError.base.d.ts +0 -1
  214. package/dist/domain/state/validationError.base.js +0 -1
  215. package/dist/domain/state/validationError.helpers.d.ts +0 -1
  216. package/dist/domain/state/validationError.helpers.js +0 -1
  217. package/dist/domain/transaction/index.d.ts +0 -1
  218. package/dist/domain/transaction/index.js +0 -1
  219. package/dist/domain/transaction/transactionError.base.d.ts +0 -1
  220. package/dist/domain/transaction/transactionError.base.js +0 -1
  221. package/dist/domain/transaction/transactionError.misc.d.ts +0 -1
  222. package/dist/domain/transaction/transactionError.misc.js +0 -1
  223. package/dist/domain/transaction/transactionError.types.d.ts +0 -1
  224. package/dist/domain/transaction/transactionError.types.js +0 -1
  225. package/dist/domain/traversal/index.d.ts +0 -1
  226. package/dist/domain/traversal/index.js +0 -1
  227. package/dist/domain/traversal/traversalLimit.error.d.ts +0 -1
  228. package/dist/domain/traversal/traversalLimit.error.js +0 -1
  229. package/dist/index.d.ts +0 -1
  230. package/dist/index.js +0 -1
  231. package/dist/infrastructure/adapter/adapter.error.d.ts +0 -1
  232. package/dist/infrastructure/adapter/adapter.error.js +0 -1
  233. package/dist/infrastructure/adapter/adapterError.base.d.ts +0 -1
  234. package/dist/infrastructure/adapter/adapterError.base.js +0 -1
  235. package/dist/infrastructure/adapter/adapterError.lifecycle.d.ts +0 -1
  236. package/dist/infrastructure/adapter/adapterError.lifecycle.js +0 -1
  237. package/dist/infrastructure/adapter/adapterError.operation.d.ts +0 -1
  238. package/dist/infrastructure/adapter/adapterError.operation.js +2 -3
  239. package/dist/infrastructure/adapter/index.d.ts +0 -1
  240. package/dist/infrastructure/adapter/index.js +0 -1
  241. package/dist/infrastructure/cache/cache.error.d.ts +0 -1
  242. package/dist/infrastructure/cache/cache.error.js +0 -1
  243. package/dist/infrastructure/cache/cacheError.base.d.ts +0 -1
  244. package/dist/infrastructure/cache/cacheError.base.js +0 -1
  245. package/dist/infrastructure/cache/cacheError.factory.d.ts +0 -1
  246. package/dist/infrastructure/cache/cacheError.factory.js +0 -1
  247. package/dist/infrastructure/cache/index.d.ts +0 -1
  248. package/dist/infrastructure/cache/index.js +0 -1
  249. package/dist/infrastructure/container/container.error.d.ts +0 -1
  250. package/dist/infrastructure/container/container.error.js +0 -1
  251. package/dist/infrastructure/container/containerError.base.d.ts +0 -1
  252. package/dist/infrastructure/container/containerError.base.js +0 -1
  253. package/dist/infrastructure/container/containerError.registration.d.ts +0 -1
  254. package/dist/infrastructure/container/containerError.registration.js +0 -1
  255. package/dist/infrastructure/container/index.d.ts +0 -1
  256. package/dist/infrastructure/container/index.js +0 -1
  257. package/dist/infrastructure/httpPipeline/httpMiddleware.error.d.ts +0 -1
  258. package/dist/infrastructure/httpPipeline/httpMiddleware.error.js +0 -1
  259. package/dist/infrastructure/httpPipeline/httpRequestGuard.error.d.ts +0 -1
  260. package/dist/infrastructure/httpPipeline/httpRequestGuard.error.js +0 -1
  261. package/dist/infrastructure/httpPipeline/index.d.ts +0 -1
  262. package/dist/infrastructure/httpPipeline/index.js +0 -1
  263. package/dist/infrastructure/index.d.ts +0 -1
  264. package/dist/infrastructure/index.js +0 -1
  265. package/dist/infrastructure/middleware/index.d.ts +0 -1
  266. package/dist/infrastructure/middleware/index.js +0 -1
  267. package/dist/infrastructure/middleware/middleware.error.d.ts +0 -1
  268. package/dist/infrastructure/middleware/middleware.error.js +3 -1
  269. package/dist/infrastructure/middleware/middlewareError.types.d.ts +8 -3
  270. package/dist/infrastructure/middleware/middlewareError.types.js +27 -4
  271. package/dist/infrastructure/network/http.error.d.ts +0 -1
  272. package/dist/infrastructure/network/http.error.js +0 -1
  273. package/dist/infrastructure/network/httpAdapter.error.d.ts +0 -1
  274. package/dist/infrastructure/network/httpAdapter.error.js +0 -1
  275. package/dist/infrastructure/network/httpClient.errors.d.ts +0 -1
  276. package/dist/infrastructure/network/httpClient.errors.js +0 -1
  277. package/dist/infrastructure/network/httpClientError.advanced.d.ts +0 -1
  278. package/dist/infrastructure/network/httpClientError.advanced.js +0 -1
  279. package/dist/infrastructure/network/httpClientError.base.d.ts +0 -1
  280. package/dist/infrastructure/network/httpClientError.base.js +0 -1
  281. package/dist/infrastructure/network/httpClientError.common.d.ts +0 -1
  282. package/dist/infrastructure/network/httpClientError.common.js +0 -1
  283. package/dist/infrastructure/network/httpClientError.error.d.ts +0 -1
  284. package/dist/infrastructure/network/httpClientError.error.js +0 -1
  285. package/dist/infrastructure/network/httpClientError.options.d.ts +0 -1
  286. package/dist/infrastructure/network/httpClientError.options.js +0 -1
  287. package/dist/infrastructure/network/httpClientError.specialized.d.ts +0 -1
  288. package/dist/infrastructure/network/httpClientError.specialized.js +0 -1
  289. package/dist/infrastructure/network/httpClientError.types.d.ts +0 -1
  290. package/dist/infrastructure/network/httpClientError.types.js +0 -1
  291. package/dist/infrastructure/network/httpError.base.d.ts +0 -1
  292. package/dist/infrastructure/network/httpError.base.js +0 -1
  293. package/dist/infrastructure/network/httpError.helpers.d.ts +0 -1
  294. package/dist/infrastructure/network/httpError.helpers.js +0 -1
  295. package/dist/infrastructure/network/httpResponse.error.d.ts +0 -1
  296. package/dist/infrastructure/network/httpResponse.error.js +0 -1
  297. package/dist/infrastructure/network/httpRouter.error.d.ts +0 -1
  298. package/dist/infrastructure/network/httpRouter.error.js +0 -1
  299. package/dist/infrastructure/network/httpRouterError.base.d.ts +0 -1
  300. package/dist/infrastructure/network/httpRouterError.base.js +0 -1
  301. package/dist/infrastructure/network/httpRouterError.types.d.ts +22 -2
  302. package/dist/infrastructure/network/httpRouterError.types.js +24 -4
  303. package/dist/infrastructure/network/httpServerError.error.d.ts +7 -1
  304. package/dist/infrastructure/network/httpServerError.error.js +8 -2
  305. package/dist/infrastructure/network/httpServerLifecycle.error.d.ts +0 -1
  306. package/dist/infrastructure/network/httpServerLifecycle.error.js +0 -1
  307. package/dist/infrastructure/network/httpServerLifecycleError.base.d.ts +0 -1
  308. package/dist/infrastructure/network/httpServerLifecycleError.base.js +0 -1
  309. package/dist/infrastructure/network/httpServerLifecycleError.types.d.ts +0 -1
  310. package/dist/infrastructure/network/httpServerLifecycleError.types.js +0 -1
  311. package/dist/infrastructure/network/httpStream.error.d.ts +0 -1
  312. package/dist/infrastructure/network/httpStream.error.js +0 -1
  313. package/dist/infrastructure/network/index.d.ts +0 -1
  314. package/dist/infrastructure/network/index.js +0 -1
  315. package/dist/infrastructure/network/network.error.d.ts +0 -1
  316. package/dist/infrastructure/network/network.error.js +0 -1
  317. package/dist/infrastructure/network/networkError.base.d.ts +0 -1
  318. package/dist/infrastructure/network/networkError.base.js +0 -1
  319. package/dist/infrastructure/network/networkError.factory.d.ts +0 -1
  320. package/dist/infrastructure/network/networkError.factory.js +0 -1
  321. package/dist/infrastructure/network/routePattern.error.d.ts +0 -1
  322. package/dist/infrastructure/network/routePattern.error.js +0 -1
  323. package/dist/infrastructure/network/timeout.error.d.ts +0 -1
  324. package/dist/infrastructure/network/timeout.error.js +0 -1
  325. package/dist/infrastructure/network/timeoutError.base.d.ts +0 -1
  326. package/dist/infrastructure/network/timeoutError.base.js +0 -1
  327. package/dist/infrastructure/network/timeoutError.factory.d.ts +0 -1
  328. package/dist/infrastructure/network/timeoutError.factory.js +0 -1
  329. package/dist/infrastructure/service/externalService.error.d.ts +0 -1
  330. package/dist/infrastructure/service/externalService.error.js +0 -1
  331. package/dist/infrastructure/service/externalServiceError.base.d.ts +9 -3
  332. package/dist/infrastructure/service/externalServiceError.base.js +20 -3
  333. package/dist/infrastructure/service/externalServiceError.factory.d.ts +0 -1
  334. package/dist/infrastructure/service/externalServiceError.factory.js +0 -1
  335. package/dist/infrastructure/service/index.d.ts +0 -1
  336. package/dist/infrastructure/service/index.js +0 -1
  337. package/dist/infrastructure/service/service.error.d.ts +0 -1
  338. package/dist/infrastructure/service/service.error.js +0 -1
  339. package/dist/infrastructure/service/serviceError.base.d.ts +0 -1
  340. package/dist/infrastructure/service/serviceError.base.js +0 -1
  341. package/dist/infrastructure/service/serviceError.factory.d.ts +0 -1
  342. package/dist/infrastructure/service/serviceError.factory.js +0 -1
  343. package/dist/infrastructure/storage/database.error.d.ts +0 -1
  344. package/dist/infrastructure/storage/database.error.js +0 -1
  345. package/dist/infrastructure/storage/databaseError.base.d.ts +0 -1
  346. package/dist/infrastructure/storage/databaseError.base.js +0 -1
  347. package/dist/infrastructure/storage/databaseError.factory.d.ts +0 -1
  348. package/dist/infrastructure/storage/databaseError.factory.js +0 -1
  349. package/dist/infrastructure/storage/index.d.ts +0 -1
  350. package/dist/infrastructure/storage/index.js +0 -1
  351. package/dist/infrastructure/storage/storage.error.d.ts +0 -1
  352. package/dist/infrastructure/storage/storage.error.js +0 -1
  353. package/dist/infrastructure/storage/storageError.base.d.ts +0 -1
  354. package/dist/infrastructure/storage/storageError.base.js +0 -1
  355. package/dist/infrastructure/storage/storageError.factory.d.ts +0 -1
  356. package/dist/infrastructure/storage/storageError.factory.js +0 -1
  357. package/dist/system/crypto.error.d.ts +0 -1
  358. package/dist/system/crypto.error.js +0 -1
  359. package/dist/system/cryptoError.base.d.ts +0 -1
  360. package/dist/system/cryptoError.base.js +0 -1
  361. package/dist/system/cryptoError.factory.d.ts +0 -1
  362. package/dist/system/cryptoError.factory.js +0 -1
  363. package/dist/system/index.d.ts +0 -1
  364. package/dist/system/index.js +0 -1
  365. package/dist/system/logging/index.d.ts +0 -1
  366. package/dist/system/logging/index.js +0 -1
  367. package/dist/system/logging/logging.error.d.ts +0 -1
  368. package/dist/system/logging/logging.error.js +0 -1
  369. package/dist/system/observability/index.d.ts +0 -1
  370. package/dist/system/observability/index.js +0 -1
  371. package/dist/system/observability/observabilityError.base.d.ts +0 -1
  372. package/dist/system/observability/observabilityError.base.js +0 -1
  373. package/dist/system/runtime.error.d.ts +0 -1
  374. package/dist/system/runtime.error.js +0 -1
  375. package/dist/system/runtimeError.base.d.ts +0 -1
  376. package/dist/system/runtimeError.base.js +0 -1
  377. package/dist/system/runtimeError.types.d.ts +0 -1
  378. package/dist/system/runtimeError.types.js +0 -1
  379. package/dist/system/system.error.d.ts +0 -1
  380. package/dist/system/system.error.js +0 -1
  381. package/dist/system/systemError.base.d.ts +0 -1
  382. package/dist/system/systemError.base.js +0 -1
  383. package/dist/system/systemError.factory.d.ts +0 -1
  384. package/dist/system/systemError.factory.js +0 -1
  385. package/dist/utils/errorHandler.core.d.ts +1 -1
  386. package/dist/utils/errorHandler.core.js +12 -12
  387. package/dist/utils/errorHandler.factory.d.ts +0 -1
  388. package/dist/utils/errorHandler.factory.js +0 -1
  389. package/dist/utils/errorHandler.types.d.ts +11 -4
  390. package/dist/utils/errorHandler.types.js +0 -1
  391. package/dist/utils/errorMapper.core.d.ts +0 -1
  392. package/dist/utils/errorMapper.core.js +0 -1
  393. package/dist/utils/errorMapper.mappers.d.ts +0 -1
  394. package/dist/utils/errorMapper.mappers.js +0 -1
  395. package/dist/utils/errorMapper.registry.d.ts +0 -1
  396. package/dist/utils/errorMapper.registry.js +0 -1
  397. package/dist/utils/errorMapper.types.d.ts +0 -1
  398. package/dist/utils/errorMapper.types.js +0 -1
  399. package/dist/utils/errorSerializer.core.d.ts +6 -4
  400. package/dist/utils/errorSerializer.core.js +17 -19
  401. package/dist/utils/errorSerializer.factory.d.ts +0 -1
  402. package/dist/utils/errorSerializer.factory.js +0 -1
  403. package/dist/utils/errorSerializer.public.d.ts +41 -0
  404. package/dist/utils/errorSerializer.public.js +54 -0
  405. package/dist/utils/errorSerializer.types.d.ts +19 -3
  406. package/dist/utils/errorSerializer.types.js +0 -1
  407. package/dist/utils/errorUtils.extraction.d.ts +0 -1
  408. package/dist/utils/errorUtils.extraction.js +0 -1
  409. package/dist/utils/errorUtils.helper.d.ts +0 -1
  410. package/dist/utils/errorUtils.helper.js +0 -1
  411. package/dist/utils/errorUtils.transform.d.ts +0 -1
  412. package/dist/utils/errorUtils.transform.js +0 -1
  413. package/dist/utils/errorUtils.typeCheck.d.ts +0 -1
  414. package/dist/utils/errorUtils.typeCheck.js +0 -1
  415. package/dist/utils/index.d.ts +0 -1
  416. package/dist/utils/index.js +0 -1
  417. package/package.json +1 -1
@@ -2,7 +2,18 @@
2
2
  * Pipeline-guard middleware errors. Constructors and defaults match the
3
3
  * wrappers `@zudojs/middleware` defines over the shared `MiddlewareError`.
4
4
  */
5
+ import { ErrorCode } from "../../base/types/errorCode.type.js";
6
+ import { ErrorSeverity } from "../../base/types/errorSeverity.type.js";
5
7
  import { MiddlewareError } from "./middleware.error.js";
8
+ /**
9
+ * `Retry-After` in whole seconds, never below 1: a client told to retry
10
+ * after 0 seconds retries immediately and is refused again.
11
+ */
12
+ function retryAfterSeconds(retryAfterMs) {
13
+ if (!Number.isFinite(retryAfterMs) || retryAfterMs <= 0)
14
+ return 1;
15
+ return Math.max(1, Math.ceil(retryAfterMs / 1000));
16
+ }
6
17
  /** Error thrown when a pipeline is configured with more middleware than allowed. */
7
18
  export class MiddlewareLimitExceededError extends MiddlewareError {
8
19
  constructor(count, maximum) {
@@ -18,21 +29,34 @@ export class MiddlewareDepthExceededError extends MiddlewareError {
18
29
  }
19
30
  }
20
31
  /**
21
- * Error thrown when a rate limit is exceeded. `retryAfterMs` feeds a
22
- * `Retry-After` header.
32
+ * Error thrown when a rate limit is exceeded.
33
+ *
34
+ * Reaches HTTP clients as a 429 with `ERR_RATE_LIMITED`, an exposed message
35
+ * and a `Retry-After` header (`headers`), which `@zudojs/http` copies onto
36
+ * the response. It used to be a generic, unexposed 500 with the middleware
37
+ * execution code, so the documented 429 never happened.
23
38
  */
24
39
  export class MiddlewareRateLimitError extends MiddlewareError {
25
40
  retryAfterMs;
26
41
  limit;
27
42
  windowMs;
43
+ /** Response headers for an HTTP adapter: `retry-after` in whole seconds. */
44
+ headers;
28
45
  constructor(limit, windowMs, retryAfterMs) {
29
46
  super(`Rate limit exceeded: ${limit} requests per ${windowMs}ms`, {
30
47
  middlewareName: "rate-limit",
31
- metadata: { middlewareName: "rate-limit" },
48
+ code: ErrorCode.RATE_LIMITED,
49
+ statusCode: 429,
50
+ expose: true,
51
+ severity: ErrorSeverity.WARNING,
52
+ metadata: { middlewareName: "rate-limit", limit, windowMs, retryAfterMs },
32
53
  });
33
54
  this.retryAfterMs = retryAfterMs;
34
55
  this.limit = limit;
35
56
  this.windowMs = windowMs;
57
+ this.headers = Object.freeze({
58
+ "retry-after": String(retryAfterSeconds(retryAfterMs)),
59
+ });
36
60
  }
37
61
  }
38
62
  /** Error thrown when a pipeline is aborted through its `AbortSignal`. */
@@ -41,4 +65,3 @@ export class MiddlewareAbortedError extends MiddlewareError {
41
65
  super("Middleware pipeline aborted", { cause: reason });
42
66
  }
43
67
  }
44
- //# sourceMappingURL=middlewareError.types.js.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export * from "./httpError.base.js";
5
5
  export * from "./httpError.helpers.js";
6
- //# sourceMappingURL=http.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export * from "./httpError.base.js";
5
5
  export * from "./httpError.helpers.js";
6
- //# sourceMappingURL=http.error.js.map
@@ -40,4 +40,3 @@ export declare function createHttpAdapterError(message: string, options?: HttpAd
40
40
  * Determines whether an unknown value is an HttpAdapterError.
41
41
  */
42
42
  export declare function isHttpAdapterError(value: unknown): value is HttpAdapterError;
43
- //# sourceMappingURL=httpAdapter.error.d.ts.map
@@ -62,4 +62,3 @@ export function createHttpAdapterError(message, options = {}) {
62
62
  export function isHttpAdapterError(value) {
63
63
  return value instanceof HttpAdapterError;
64
64
  }
65
- //# sourceMappingURL=httpAdapter.error.js.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export * from "./httpClientError.base.js";
5
5
  export * from "./httpClientError.types.js";
6
- //# sourceMappingURL=httpClient.errors.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export * from "./httpClientError.base.js";
5
5
  export * from "./httpClientError.types.js";
6
- //# sourceMappingURL=httpClient.errors.js.map
@@ -39,4 +39,3 @@ export declare class RequestHeaderFieldsTooLargeError extends HttpError {
39
39
  export declare class RequestAbortedError extends HttpError {
40
40
  constructor(message?: string, options?: HttpClientErrorOptions);
41
41
  }
42
- //# sourceMappingURL=httpClientError.advanced.d.ts.map
@@ -93,4 +93,3 @@ export class RequestAbortedError extends HttpError {
93
93
  });
94
94
  }
95
95
  }
96
- //# sourceMappingURL=httpClientError.advanced.js.map
@@ -46,4 +46,3 @@ export declare class HttpClientError extends BaseError {
46
46
  export declare function mapUpstreamStatus(status: number | undefined): number;
47
47
  /** Removes credentials and the query string from a URL before storing it. */
48
48
  export declare function stripUrlCredentials(url: string): string;
49
- //# sourceMappingURL=httpClientError.base.d.ts.map
@@ -81,4 +81,3 @@ export function stripUrlCredentials(url) {
81
81
  return withoutQuery.replace(/\/\/[^/@]*@/, "//");
82
82
  }
83
83
  }
84
- //# sourceMappingURL=httpClientError.base.js.map
@@ -78,4 +78,3 @@ export declare class RangeNotSatisfiableError extends HttpError {
78
78
  export declare class ExpectationFailedError extends HttpError {
79
79
  constructor(message?: string, options?: HttpClientErrorOptions);
80
80
  }
81
- //# sourceMappingURL=httpClientError.common.d.ts.map
@@ -159,4 +159,3 @@ export class ExpectationFailedError extends HttpError {
159
159
  });
160
160
  }
161
161
  }
162
- //# sourceMappingURL=httpClientError.common.js.map
@@ -5,4 +5,3 @@ export type { HttpClientErrorOptions } from "./httpClientError.options.js";
5
5
  export { BadRequestError, UnauthorizedError, ForbiddenError, HttpNotFoundError, MethodNotAllowedError, NotAcceptableError, RequestTimeoutError, HttpConflictError, GoneError, LengthRequiredError, PayloadTooLargeError, URITooLongError, UnsupportedMediaTypeError, RangeNotSatisfiableError, ExpectationFailedError, } from "./httpClientError.common.js";
6
6
  export { UnprocessableEntityError, LockedError, FailedDependencyError, TooEarlyError, UpgradeRequiredError, PreconditionRequiredError, TooManyRequestsError, RequestHeaderFieldsTooLargeError, RequestAbortedError, } from "./httpClientError.advanced.js";
7
7
  export { RequestBodyTimeoutError, UnsupportedProtocolError, InvalidHeaderError, InvalidContentTypeError, } from "./httpClientError.specialized.js";
8
- //# sourceMappingURL=httpClientError.error.d.ts.map
@@ -4,4 +4,3 @@
4
4
  export { BadRequestError, UnauthorizedError, ForbiddenError, HttpNotFoundError, MethodNotAllowedError, NotAcceptableError, RequestTimeoutError, HttpConflictError, GoneError, LengthRequiredError, PayloadTooLargeError, URITooLongError, UnsupportedMediaTypeError, RangeNotSatisfiableError, ExpectationFailedError, } from "./httpClientError.common.js";
5
5
  export { UnprocessableEntityError, LockedError, FailedDependencyError, TooEarlyError, UpgradeRequiredError, PreconditionRequiredError, TooManyRequestsError, RequestHeaderFieldsTooLargeError, RequestAbortedError, } from "./httpClientError.advanced.js";
6
6
  export { RequestBodyTimeoutError, UnsupportedProtocolError, InvalidHeaderError, InvalidContentTypeError, } from "./httpClientError.specialized.js";
7
- //# sourceMappingURL=httpClientError.error.js.map
@@ -8,4 +8,3 @@ export interface HttpClientErrorOptions {
8
8
  readonly expose?: boolean;
9
9
  readonly metadata?: ErrorMetadata;
10
10
  }
11
- //# sourceMappingURL=httpClientError.options.d.ts.map
@@ -2,4 +2,3 @@
2
2
  * Options for creating HTTP client errors.
3
3
  */
4
4
  export {};
5
- //# sourceMappingURL=httpClientError.options.js.map
@@ -22,4 +22,3 @@ export declare class InvalidContentTypeError extends HttpError {
22
22
  readonly contentType: string | undefined;
23
23
  constructor(contentType?: string, options?: HttpClientErrorOptions);
24
24
  }
25
- //# sourceMappingURL=httpClientError.specialized.d.ts.map
@@ -50,4 +50,3 @@ export class InvalidContentTypeError extends HttpError {
50
50
  this.contentType = contentType;
51
51
  }
52
52
  }
53
- //# sourceMappingURL=httpClientError.specialized.js.map
@@ -48,4 +48,3 @@ export declare class HttpClientAbortError extends HttpClientError {
48
48
  export declare class HttpClientNetworkError extends HttpClientError {
49
49
  constructor(message: string, request?: Request | HttpClientClientErrorOptions, cause?: unknown, options?: HttpClientClientErrorOptions);
50
50
  }
51
- //# sourceMappingURL=httpClientError.types.d.ts.map
@@ -93,4 +93,3 @@ function describeSystemError(cause) {
93
93
  }
94
94
  return result;
95
95
  }
96
- //# sourceMappingURL=httpClientError.types.js.map
@@ -19,4 +19,3 @@ export declare class HttpError extends BaseError {
19
19
  export declare function createHttpError(message: string, statusCode: number, options?: Omit<HttpErrorOptions, "statusCode">): HttpError;
20
20
  /** Determines whether an unknown value is an HttpError. */
21
21
  export declare function isHttpError(value: unknown): value is HttpError;
22
- //# sourceMappingURL=httpError.base.d.ts.map
@@ -37,4 +37,3 @@ function inferSeverity(statusCode) {
37
37
  return ErrorSeverity.WARNING;
38
38
  return ErrorSeverity.INFO;
39
39
  }
40
- //# sourceMappingURL=httpError.base.js.map
@@ -9,4 +9,3 @@ export declare function isHttpRedirectStatus(statusCode: number): boolean;
9
9
  export declare function isHttpClientErrorStatus(statusCode: number): boolean;
10
10
  /** Returns whether a status code represents a server error. */
11
11
  export declare function isHttpServerErrorStatus(statusCode: number): boolean;
12
- //# sourceMappingURL=httpError.helpers.d.ts.map
@@ -17,4 +17,3 @@ export function isHttpClientErrorStatus(statusCode) {
17
17
  export function isHttpServerErrorStatus(statusCode) {
18
18
  return statusCode >= 500 && statusCode < 600;
19
19
  }
20
- //# sourceMappingURL=httpError.helpers.js.map
@@ -33,4 +33,3 @@ export declare function createHttpResponseWriterError(message: string, options?:
33
33
  * Determines whether an unknown value is an HttpResponseWriterError.
34
34
  */
35
35
  export declare function isHttpResponseWriterError(value: unknown): value is HttpResponseWriterError;
36
- //# sourceMappingURL=httpResponse.error.d.ts.map
@@ -49,4 +49,3 @@ export function createHttpResponseWriterError(message, options = {}) {
49
49
  export function isHttpResponseWriterError(value) {
50
50
  return value instanceof HttpResponseWriterError;
51
51
  }
52
- //# sourceMappingURL=httpResponse.error.js.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export * from "./httpRouterError.base.js";
5
5
  export * from "./httpRouterError.types.js";
6
- //# sourceMappingURL=httpRouter.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export * from "./httpRouterError.base.js";
5
5
  export * from "./httpRouterError.types.js";
6
- //# sourceMappingURL=httpRouter.error.js.map
@@ -17,4 +17,3 @@ export declare class HttpRouterError extends BaseError {
17
17
  export declare function createHttpRouterError(message: string, options?: HttpRouterErrorOptions): HttpRouterError;
18
18
  /** Determines whether an unknown value is an HttpRouterError. */
19
19
  export declare function isHttpRouterError(value: unknown): value is HttpRouterError;
20
- //# sourceMappingURL=httpRouterError.base.d.ts.map
@@ -25,4 +25,3 @@ export function createHttpRouterError(message, options = {}) {
25
25
  export function isHttpRouterError(value) {
26
26
  return value instanceof HttpRouterError;
27
27
  }
28
- //# sourceMappingURL=httpRouterError.base.js.map
@@ -1,14 +1,35 @@
1
1
  import { RoutePatternError } from "./routePattern.error.js";
2
2
  import { HttpRouterError } from "./httpRouterError.base.js";
3
+ /** Options for {@link RouteConflictError}. */
4
+ export interface RouteConflictErrorOptions {
5
+ /**
6
+ * Replaces the default "A route for METHOD /path is already registered."
7
+ * message entirely, for a conflict that is not a duplicate registration.
8
+ */
9
+ readonly message?: string;
10
+ /**
11
+ * Why the route conflicts, e.g. `"shadowed by GET /users/:id"`. Recorded
12
+ * in `metadata.reason` and, unless `message` is given, reported as
13
+ * "A route for METHOD /path conflicts with an existing route: <reason>".
14
+ */
15
+ readonly reason?: string;
16
+ readonly cause?: unknown;
17
+ }
3
18
  /**
4
19
  * Error thrown when a route conflicts with an existing route.
20
+ *
21
+ * The default message describes a duplicate registration; pass `reason` or
22
+ * `message` for other conflicts (an unreachable route shadowed by an earlier
23
+ * pattern, say). The code stays `ERR_HTTP_ROUTE_CONFLICT` either way.
5
24
  */
6
25
  export declare class RouteConflictError extends HttpRouterError {
7
26
  /** The route path that conflicts. */
8
27
  readonly path: string;
9
28
  /** The HTTP method that conflicts. */
10
29
  readonly method: string;
11
- constructor(path: string, method: string);
30
+ /** Why the route conflicts, when the caller said. */
31
+ readonly reason?: string;
32
+ constructor(path: string, method: string, options?: RouteConflictErrorOptions);
12
33
  }
13
34
  /**
14
35
  * Error thrown when a route pattern is invalid.
@@ -19,4 +40,3 @@ export declare class RouteConflictError extends HttpRouterError {
19
40
  export declare class InvalidRoutePatternError extends RoutePatternError {
20
41
  constructor(pattern: string, message: string);
21
42
  }
22
- //# sourceMappingURL=httpRouterError.types.d.ts.map
@@ -3,20 +3,41 @@ import { RoutePatternError } from "./routePattern.error.js";
3
3
  import { HttpRouterError } from "./httpRouterError.base.js";
4
4
  /**
5
5
  * Error thrown when a route conflicts with an existing route.
6
+ *
7
+ * The default message describes a duplicate registration; pass `reason` or
8
+ * `message` for other conflicts (an unreachable route shadowed by an earlier
9
+ * pattern, say). The code stays `ERR_HTTP_ROUTE_CONFLICT` either way.
6
10
  */
7
11
  export class RouteConflictError extends HttpRouterError {
8
12
  /** The route path that conflicts. */
9
13
  path;
10
14
  /** The HTTP method that conflicts. */
11
15
  method;
12
- constructor(path, method) {
13
- super(`A route for ${method} ${path} is already registered.`, {
16
+ /** Why the route conflicts, when the caller said. */
17
+ reason;
18
+ constructor(path, method, options = {}) {
19
+ super(conflictMessage(path, method, options), {
14
20
  code: ErrorCode.HTTP_ROUTE_CONFLICT,
15
- metadata: { path, method },
21
+ metadata: {
22
+ path,
23
+ method,
24
+ ...(options.reason !== undefined ? { reason: options.reason } : {}),
25
+ },
26
+ ...(options.cause !== undefined ? { cause: options.cause } : {}),
16
27
  });
17
28
  this.path = path;
18
29
  this.method = method;
30
+ this.reason = options.reason;
31
+ }
32
+ }
33
+ /** Builds the RouteConflictError message from the caller's options. */
34
+ function conflictMessage(path, method, options) {
35
+ if (options.message !== undefined)
36
+ return options.message;
37
+ if (options.reason !== undefined) {
38
+ return `A route for ${method} ${path} conflicts with an existing route: ${options.reason}`;
19
39
  }
40
+ return `A route for ${method} ${path} is already registered.`;
20
41
  }
21
42
  /**
22
43
  * Error thrown when a route pattern is invalid.
@@ -32,4 +53,3 @@ export class InvalidRoutePatternError extends RoutePatternError {
32
53
  });
33
54
  }
34
55
  }
35
- //# sourceMappingURL=httpRouterError.types.js.map
@@ -36,6 +36,13 @@ export declare class BadGatewayError extends HttpError {
36
36
  }
37
37
  /**
38
38
  * 503 Service Unavailable
39
+ *
40
+ * Unlike the other 5xx classes this one exposes its message by default: 503
41
+ * is the status a service sends on purpose (maintenance, overload, a
42
+ * dependency down), and its message ("Back at 03:00 UTC") is written for the
43
+ * client, as it is for `APIUnavailableError` and `RPCUnavailableError`. Pass
44
+ * `expose: false` for a message that must stay internal. Metadata is not
45
+ * exposed by `expose` alone (see `ErrorSerializerOptions.exposeMetadata`).
39
46
  */
40
47
  export declare class ServiceUnavailableError extends HttpError {
41
48
  constructor(message?: string, options?: HttpServerErrorOptions);
@@ -46,4 +53,3 @@ export declare class ServiceUnavailableError extends HttpError {
46
53
  export declare class GatewayTimeoutError extends HttpError {
47
54
  constructor(message?: string, options?: HttpServerErrorOptions);
48
55
  }
49
- //# sourceMappingURL=httpServerError.error.d.ts.map
@@ -48,6 +48,13 @@ export class BadGatewayError extends HttpError {
48
48
  }
49
49
  /**
50
50
  * 503 Service Unavailable
51
+ *
52
+ * Unlike the other 5xx classes this one exposes its message by default: 503
53
+ * is the status a service sends on purpose (maintenance, overload, a
54
+ * dependency down), and its message ("Back at 03:00 UTC") is written for the
55
+ * client, as it is for `APIUnavailableError` and `RPCUnavailableError`. Pass
56
+ * `expose: false` for a message that must stay internal. Metadata is not
57
+ * exposed by `expose` alone (see `ErrorSerializerOptions.exposeMetadata`).
51
58
  */
52
59
  export class ServiceUnavailableError extends HttpError {
53
60
  constructor(message = "Service Unavailable", options = {}) {
@@ -55,7 +62,7 @@ export class ServiceUnavailableError extends HttpError {
55
62
  ...options,
56
63
  statusCode: 503,
57
64
  code: options.code ?? ErrorCode.HTTP_SERVICE_UNAVAILABLE,
58
- expose: options.expose ?? false,
65
+ expose: options.expose ?? true,
59
66
  });
60
67
  }
61
68
  }
@@ -72,4 +79,3 @@ export class GatewayTimeoutError extends HttpError {
72
79
  });
73
80
  }
74
81
  }
75
- //# sourceMappingURL=httpServerError.error.js.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export * from "./httpServerLifecycleError.base.js";
5
5
  export * from "./httpServerLifecycleError.types.js";
6
- //# sourceMappingURL=httpServerLifecycle.error.d.ts.map
@@ -3,4 +3,3 @@
3
3
  */
4
4
  export * from "./httpServerLifecycleError.base.js";
5
5
  export * from "./httpServerLifecycleError.types.js";
6
- //# sourceMappingURL=httpServerLifecycle.error.js.map
@@ -17,4 +17,3 @@ export declare class HttpServerLifecycleError extends BaseError {
17
17
  export declare function createHttpServerLifecycleError(message: string, options?: HttpServerLifecycleErrorOptions): HttpServerLifecycleError;
18
18
  /** Determines whether an unknown value is an HttpServerLifecycleError. */
19
19
  export declare function isHttpServerLifecycleError(value: unknown): value is HttpServerLifecycleError;
20
- //# sourceMappingURL=httpServerLifecycleError.base.d.ts.map
@@ -25,4 +25,3 @@ export function createHttpServerLifecycleError(message, options = {}) {
25
25
  export function isHttpServerLifecycleError(value) {
26
26
  return value instanceof HttpServerLifecycleError;
27
27
  }
28
- //# sourceMappingURL=httpServerLifecycleError.base.js.map
@@ -19,4 +19,3 @@ export declare class HttpServerStartError extends HttpServerLifecycleError {
19
19
  export declare class HttpServerStopError extends HttpServerLifecycleError {
20
20
  constructor(message: string, cause?: unknown);
21
21
  }
22
- //# sourceMappingURL=httpServerLifecycleError.types.d.ts.map
@@ -36,4 +36,3 @@ export class HttpServerStopError extends HttpServerLifecycleError {
36
36
  });
37
37
  }
38
38
  }
39
- //# sourceMappingURL=httpServerLifecycleError.types.js.map
@@ -21,4 +21,3 @@ export declare function createHttpStreamError(message: string, options?: HttpStr
21
21
  * Determines whether an unknown value is an HttpStreamError.
22
22
  */
23
23
  export declare function isHttpStreamError(value: unknown): value is HttpStreamError;
24
- //# sourceMappingURL=httpStream.error.d.ts.map
@@ -29,4 +29,3 @@ export function createHttpStreamError(message, options = {}) {
29
29
  export function isHttpStreamError(value) {
30
30
  return value instanceof HttpStreamError;
31
31
  }
32
- //# sourceMappingURL=httpStream.error.js.map
@@ -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.d.ts.map
@@ -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