@noodleseed/one 0.22.0 → 0.23.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 (197) hide show
  1. package/dist/commands/author-loop.d.ts.map +1 -1
  2. package/dist/commands/author-loop.js +2 -2
  3. package/dist/commands/author-loop.js.map +1 -1
  4. package/dist/commands/catalog-dispatch.d.ts.map +1 -1
  5. package/dist/commands/catalog-dispatch.js +21 -2
  6. package/dist/commands/catalog-dispatch.js.map +1 -1
  7. package/dist/commands/deploy-ops.d.ts.map +1 -1
  8. package/dist/commands/deploy-ops.js +28 -11
  9. package/dist/commands/deploy-ops.js.map +1 -1
  10. package/dist/first-run.d.ts +11 -0
  11. package/dist/first-run.d.ts.map +1 -1
  12. package/dist/first-run.js +19 -4
  13. package/dist/first-run.js.map +1 -1
  14. package/dist/project-scaffold-templates.d.ts +11 -0
  15. package/dist/project-scaffold-templates.d.ts.map +1 -0
  16. package/dist/project-scaffold-templates.js +359 -0
  17. package/dist/project-scaffold-templates.js.map +1 -0
  18. package/dist/project.d.ts.map +1 -1
  19. package/dist/project.js +1 -323
  20. package/dist/project.js.map +1 -1
  21. package/dist/react.d.ts +2 -2
  22. package/dist/react.d.ts.map +1 -1
  23. package/dist/react.js +1 -1
  24. package/dist/react.js.map +1 -1
  25. package/dist/validate.d.ts +12 -0
  26. package/dist/validate.d.ts.map +1 -1
  27. package/dist/validate.js +11 -0
  28. package/dist/validate.js.map +1 -1
  29. package/node_modules/@noodle-borg/agent-kit/dist/skill-content.d.ts.map +1 -1
  30. package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js +6 -9
  31. package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js.map +1 -1
  32. package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
  33. package/node_modules/@noodle-borg/authoring/dist/index.d.ts +3 -3
  34. package/node_modules/@noodle-borg/authoring/dist/index.d.ts.map +1 -1
  35. package/node_modules/@noodle-borg/authoring/dist/index.js +1 -1
  36. package/node_modules/@noodle-borg/authoring/dist/index.js.map +1 -1
  37. package/node_modules/@noodle-borg/authoring/dist/react/components.d.ts +302 -7
  38. package/node_modules/@noodle-borg/authoring/dist/react/components.d.ts.map +1 -1
  39. package/node_modules/@noodle-borg/authoring/dist/react/components.js +39 -7
  40. package/node_modules/@noodle-borg/authoring/dist/react/components.js.map +1 -1
  41. package/node_modules/@noodle-borg/authoring/dist/react/index.d.ts +4 -2
  42. package/node_modules/@noodle-borg/authoring/dist/react/index.d.ts.map +1 -1
  43. package/node_modules/@noodle-borg/authoring/dist/react/index.js +2 -1
  44. package/node_modules/@noodle-borg/authoring/dist/react/index.js.map +1 -1
  45. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.d.ts +2618 -0
  46. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.d.ts.map +1 -0
  47. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.js +110 -0
  48. package/node_modules/@noodle-borg/authoring/dist/react/semantic-components.js.map +1 -0
  49. package/node_modules/@noodle-borg/authoring/dist/react.d.ts +2 -2
  50. package/node_modules/@noodle-borg/authoring/dist/react.d.ts.map +1 -1
  51. package/node_modules/@noodle-borg/authoring/dist/react.js +1 -1
  52. package/node_modules/@noodle-borg/authoring/dist/react.js.map +1 -1
  53. package/node_modules/@noodle-borg/authoring/dist/recording.d.ts +1 -1
  54. package/node_modules/@noodle-borg/authoring/dist/recording.d.ts.map +1 -1
  55. package/node_modules/@noodle-borg/authoring/dist/recording.js +14 -1
  56. package/node_modules/@noodle-borg/authoring/dist/recording.js.map +1 -1
  57. package/node_modules/@noodle-borg/authoring/dist/server.d.ts +25 -2
  58. package/node_modules/@noodle-borg/authoring/dist/server.d.ts.map +1 -1
  59. package/node_modules/@noodle-borg/authoring/dist/server.js +7 -3
  60. package/node_modules/@noodle-borg/authoring/dist/server.js.map +1 -1
  61. package/node_modules/@noodle-borg/compiler/dist/compile.d.ts.map +1 -1
  62. package/node_modules/@noodle-borg/compiler/dist/compile.js +20 -8
  63. package/node_modules/@noodle-borg/compiler/dist/compile.js.map +1 -1
  64. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +2 -0
  65. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts.map +1 -1
  66. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +6 -0
  67. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js.map +1 -1
  68. package/node_modules/@noodle-borg/connector-http/package.json +1 -1
  69. package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts.map +1 -1
  70. package/node_modules/@noodle-borg/protocol/dist/mapping.js +8 -0
  71. package/node_modules/@noodle-borg/protocol/dist/mapping.js.map +1 -1
  72. package/node_modules/hono/dist/adapter/aws-lambda/handler.js +15 -21
  73. package/node_modules/hono/dist/adapter/bun/websocket.js +3 -1
  74. package/node_modules/hono/dist/adapter/lambda-edge/handler.js +8 -2
  75. package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +15 -21
  76. package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +3 -1
  77. package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +8 -2
  78. package/node_modules/hono/dist/cjs/helper/css/common.js +3 -1
  79. package/node_modules/hono/dist/cjs/helper/css/index.js +9 -1
  80. package/node_modules/hono/dist/cjs/jsx/base.js +8 -14
  81. package/node_modules/hono/dist/cjs/jsx/components.js +41 -21
  82. package/node_modules/hono/dist/cjs/jsx/context.js +131 -5
  83. package/node_modules/hono/dist/cjs/jsx/streaming.js +9 -7
  84. package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -5
  85. package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +2 -2
  86. package/node_modules/hono/dist/cjs/utils/body.js +12 -4
  87. package/node_modules/hono/dist/cjs/utils/buffer.js +2 -1
  88. package/node_modules/hono/dist/cjs/validator/validator.js +3 -3
  89. package/node_modules/hono/dist/helper/css/common.js +3 -1
  90. package/node_modules/hono/dist/helper/css/index.js +9 -1
  91. package/node_modules/hono/dist/jsx/base.js +15 -15
  92. package/node_modules/hono/dist/jsx/components.js +42 -22
  93. package/node_modules/hono/dist/jsx/context.js +129 -5
  94. package/node_modules/hono/dist/jsx/streaming.js +10 -8
  95. package/node_modules/hono/dist/middleware/cors/index.js +2 -5
  96. package/node_modules/hono/dist/middleware/serve-static/index.js +2 -2
  97. package/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts +1 -1
  98. package/node_modules/hono/dist/types/jsx/base.d.ts +1 -3
  99. package/node_modules/hono/dist/types/jsx/context.d.ts +39 -0
  100. package/node_modules/hono/dist/types/middleware/context-storage/index.d.ts +2 -2
  101. package/node_modules/hono/dist/types/utils/body.d.ts +1 -1
  102. package/node_modules/hono/dist/utils/body.js +12 -4
  103. package/node_modules/hono/dist/utils/buffer.js +2 -1
  104. package/node_modules/hono/dist/validator/validator.js +3 -3
  105. package/node_modules/hono/package.json +9 -10
  106. package/node_modules/tailwindcss/dist/chunk-HMCCH6MG.mjs +1 -0
  107. package/node_modules/tailwindcss/dist/default-theme.mjs +1 -1
  108. package/node_modules/tailwindcss/dist/lib.js +13 -13
  109. package/node_modules/tailwindcss/dist/lib.mjs +18 -18
  110. package/node_modules/tailwindcss/package.json +2 -2
  111. package/node_modules/undici/README.md +3 -2
  112. package/node_modules/undici/docs/docs/api/Agent.md +248 -44
  113. package/node_modules/undici/docs/docs/api/BalancedPool.md +246 -48
  114. package/node_modules/undici/docs/docs/api/CacheStorage.md +171 -13
  115. package/node_modules/undici/docs/docs/api/CacheStore.md +294 -98
  116. package/node_modules/undici/docs/docs/api/Client.md +365 -178
  117. package/node_modules/undici/docs/docs/api/ClientStats.md +80 -14
  118. package/node_modules/undici/docs/docs/api/Connector.md +118 -36
  119. package/node_modules/undici/docs/docs/api/ContentType.md +65 -25
  120. package/node_modules/undici/docs/docs/api/Cookies.md +125 -47
  121. package/node_modules/undici/docs/docs/api/Debug.md +34 -18
  122. package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +364 -164
  123. package/node_modules/undici/docs/docs/api/Dispatcher.md +479 -1093
  124. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +101 -87
  125. package/node_modules/undici/docs/docs/api/Errors.md +503 -40
  126. package/node_modules/undici/docs/docs/api/EventSource.md +294 -32
  127. package/node_modules/undici/docs/docs/api/Fetch.md +680 -31
  128. package/node_modules/undici/docs/docs/api/GlobalInstallation.md +78 -98
  129. package/node_modules/undici/docs/docs/api/H2CClient.md +298 -176
  130. package/node_modules/undici/docs/docs/api/Interceptors.md +355 -0
  131. package/node_modules/undici/docs/docs/api/MockAgent.md +314 -322
  132. package/node_modules/undici/docs/docs/api/MockCallHistory.md +272 -98
  133. package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +189 -26
  134. package/node_modules/undici/docs/docs/api/MockClient.md +151 -33
  135. package/node_modules/undici/docs/docs/api/MockErrors.md +56 -5
  136. package/node_modules/undici/docs/docs/api/MockPool.md +299 -263
  137. package/node_modules/undici/docs/docs/api/Pool.md +235 -43
  138. package/node_modules/undici/docs/docs/api/PoolStats.md +119 -13
  139. package/node_modules/undici/docs/docs/api/ProxyAgent.md +179 -160
  140. package/node_modules/undici/docs/docs/api/RedirectHandler.md +238 -63
  141. package/node_modules/undici/docs/docs/api/RetryAgent.md +113 -26
  142. package/node_modules/undici/docs/docs/api/RetryHandler.md +161 -77
  143. package/node_modules/undici/docs/docs/api/RoundRobinPool.md +166 -72
  144. package/node_modules/undici/docs/docs/api/SnapshotAgent.md +264 -542
  145. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +162 -186
  146. package/node_modules/undici/docs/docs/api/Util.md +68 -11
  147. package/node_modules/undici/docs/docs/api/WebSocket.md +475 -80
  148. package/node_modules/undici/docs/docs/api/api-lifecycle.md +100 -32
  149. package/node_modules/undici/docs/docs/best-practices/client-certificate.md +2 -0
  150. package/node_modules/undici/docs/docs/best-practices/crawling.md +3 -1
  151. package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +6 -4
  152. package/node_modules/undici/docs/docs/best-practices/mocking-request.md +9 -7
  153. package/node_modules/undici/docs/docs/best-practices/proxy.md +3 -1
  154. package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +10 -8
  155. package/node_modules/undici/docs/docs/best-practices/writing-tests.md +2 -0
  156. package/node_modules/undici/docs/docs/{GettingStarted.md → getting-started.md} +22 -19
  157. package/node_modules/undici/docs/docs/index.md +779 -0
  158. package/node_modules/undici/docs/docs/site.json +125 -0
  159. package/node_modules/undici/docs/docs/type-map.json +79 -0
  160. package/node_modules/undici/lib/api/api-request.js +7 -1
  161. package/node_modules/undici/lib/api/readable.js +47 -2
  162. package/node_modules/undici/lib/core/errors.js +20 -0
  163. package/node_modules/undici/lib/core/request.js +1 -1
  164. package/node_modules/undici/lib/core/util.js +24 -1
  165. package/node_modules/undici/lib/dispatcher/client-h1.js +92 -1
  166. package/node_modules/undici/lib/dispatcher/client-h2.js +322 -118
  167. package/node_modules/undici/lib/dispatcher/client.js +6 -2
  168. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +1 -0
  169. package/node_modules/undici/lib/dispatcher/proxy-agent.js +42 -7
  170. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +4 -2
  171. package/node_modules/undici/lib/handler/redirect-handler.js +1 -0
  172. package/node_modules/undici/lib/handler/retry-handler.js +57 -19
  173. package/node_modules/undici/lib/util/cache.js +8 -2
  174. package/node_modules/undici/lib/web/cookies/parse.js +20 -27
  175. package/node_modules/undici/lib/web/cookies/util.js +1 -1
  176. package/node_modules/undici/lib/web/eventsource/eventsource.js +7 -18
  177. package/node_modules/undici/lib/web/eventsource/util.js +32 -1
  178. package/node_modules/undici/lib/web/fetch/body.js +43 -0
  179. package/node_modules/undici/lib/web/fetch/constants.js +1 -1
  180. package/node_modules/undici/lib/web/fetch/index.js +11 -2
  181. package/node_modules/undici/lib/web/fetch/request.js +1 -0
  182. package/node_modules/undici/lib/web/fetch/util.js +4 -1
  183. package/node_modules/undici/lib/web/websocket/receiver.js +20 -3
  184. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -1
  185. package/node_modules/undici/lib/web/websocket/websocket.js +3 -1
  186. package/node_modules/undici/package.json +1 -1
  187. package/node_modules/undici/types/client.d.ts +6 -1
  188. package/node_modules/undici/types/cookies.d.ts +1 -1
  189. package/node_modules/undici/types/errors.d.ts +10 -0
  190. package/node_modules/undici/types/fetch.d.ts +1 -0
  191. package/node_modules/undici/types/handlers.d.ts +2 -0
  192. package/node_modules/undici/types/proxy-agent.d.ts +7 -0
  193. package/package.json +4 -4
  194. package/react/styles.css +510 -5
  195. package/react/styles.source.css +850 -0
  196. package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +0 -1
  197. package/node_modules/tailwindcss/dist/chunk-XVOTX5KS.mjs +0 -1
@@ -1,49 +1,309 @@
1
1
  # Errors
2
2
 
3
- Undici exposes a variety of error objects that you can use to enhance your error handling.
4
- You can find all the error objects inside the `errors` key.
3
+ <!--introduced_in=v1.0.0-->
4
+ <!--type=module-->
5
+ <!-- source_link=lib/core/errors.js -->
6
+
7
+ > Stability: 2 - Stable
8
+
9
+ undici raises typed error objects so that failures can be distinguished
10
+ programmatically. Every error class is exposed through the `errors` namespace of
11
+ the package:
5
12
 
6
13
  ```js
7
14
  import { errors } from 'undici'
15
+
16
+ if (err instanceof errors.ConnectTimeoutError) {
17
+ // handle connect timeout
18
+ }
19
+ ```
20
+
21
+ All errors, except [`HTTPParserError`][], extend [`UndiciError`][]. Each error
22
+ carries a stable `code` string (for example `UND_ERR_CONNECT_TIMEOUT`) and a
23
+ `name`.
24
+
25
+ Because the bundled (global) dispatcher may come from a different undici version
26
+ than the one you import directly, prefer matching on `error.code` rather than
27
+ `instanceof errors.UndiciError`:
28
+
29
+ ```js
30
+ if (err.code === 'UND_ERR_CONNECT_TIMEOUT') {
31
+ // handle connect timeout
32
+ }
8
33
  ```
9
34
 
10
- | Error | Error Codes | Description |
11
- | ------------------------------------ | ------------------------------------- | ------------------------------------------------------------------------- |
12
- | `UndiciError` | `UND_ERR` | all errors below are extended from `UndiciError`. |
13
- | `ConnectTimeoutError` | `UND_ERR_CONNECT_TIMEOUT` | socket is destroyed due to connect timeout. |
14
- | `HeadersTimeoutError` | `UND_ERR_HEADERS_TIMEOUT` | socket is destroyed due to headers timeout. |
15
- | `HeadersOverflowError` | `UND_ERR_HEADERS_OVERFLOW` | socket is destroyed due to headers' max size being exceeded. |
16
- | `BodyTimeoutError` | `UND_ERR_BODY_TIMEOUT` | socket is destroyed due to body timeout. |
17
- | `InvalidArgumentError` | `UND_ERR_INVALID_ARG` | passed an invalid argument. |
18
- | `InvalidReturnValueError` | `UND_ERR_INVALID_RETURN_VALUE` | returned an invalid value. |
19
- | `RequestAbortedError` | `UND_ERR_ABORTED` | the request has been aborted by the user |
20
- | `ClientDestroyedError` | `UND_ERR_DESTROYED` | trying to use a destroyed client. |
21
- | `ClientClosedError` | `UND_ERR_CLOSED` | trying to use a closed client. |
22
- | `SocketError` | `UND_ERR_SOCKET` | there is an error with the socket. |
23
- | `NotSupportedError` | `UND_ERR_NOT_SUPPORTED` | encountered unsupported functionality. |
24
- | `RequestContentLengthMismatchError` | `UND_ERR_REQ_CONTENT_LENGTH_MISMATCH` | request body does not match content-length header |
25
- | `ResponseContentLengthMismatchError` | `UND_ERR_RES_CONTENT_LENGTH_MISMATCH` | response body does not match content-length header |
26
- | `InformationalError` | `UND_ERR_INFO` | expected error with reason |
27
- | `ResponseExceededMaxSizeError` | `UND_ERR_RES_EXCEEDED_MAX_SIZE` | response body exceed the max size allowed |
28
- | `SecureProxyConnectionError` | `UND_ERR_PRX_TLS` | tls connection to a proxy failed |
29
- | `MessageSizeExceededError` | `UND_ERR_WS_MESSAGE_SIZE_EXCEEDED` | WebSocket decompressed message exceeded the maximum allowed size |
30
- | `AbortError` | `UND_ERR_ABORT` | the operation was aborted (base class of `RequestAbortedError`). |
31
- | `RequestRetryError` | `UND_ERR_REQ_RETRY` | request failed and could not be retried; carries `statusCode`, `headers` and `data`. |
32
- | `ResponseError` | `UND_ERR_RESPONSE` | response returned an error status code; carries `statusCode`, `headers` and `body`. |
33
- | `MaxOriginsReachedError` | `UND_ERR_MAX_ORIGINS_REACHED` | the maximum number of allowed origins has been reached. |
34
- | `BalancedPoolMissingUpstreamError` | `UND_ERR_BPL_MISSING_UPSTREAM` | no upstream has been added to the `BalancedPool`. |
35
- | `Socks5ProxyError` | `UND_ERR_SOCKS5` | an error occurred during SOCKS5 proxy negotiation. |
36
- | `HTTPParserError` | `HPE_*` | an error occurred while parsing the HTTP response (extends `Error`, not `UndiciError`). |
37
-
38
- Be aware of the possible difference between the global dispatcher version and the actual undici version you might be using. We recommend to avoid the check `instanceof errors.UndiciError` and seek for the `error.code === '<error_code>'` instead to avoid inconsistencies.
39
-
40
- ### `ConnectTimeoutError`
41
-
42
- When `autoSelectFamily` is enabled and every attempted address fails with a timeout, Node raises an `AggregateError`. Undici surfaces these multi-address timeouts as `ConnectTimeoutError` (so the error shape is the same regardless of whether Node's family-attempt timer or undici's `connectTimeout` wins the race); the original `AggregateError` is preserved on `error.cause`.
43
-
44
- ### `SocketError`
45
-
46
- The `SocketError` has a `.socket` property which holds socket metadata:
35
+ ## Class: `UndiciError`
36
+
37
+ <!-- YAML
38
+ added: v1.0.0
39
+ changes:
40
+ - version: v7.16.0
41
+ pr-url: https://github.com/nodejs/undici/pull/4472
42
+ description: Made `UndiciError` and its subclasses reliable with `instanceof`
43
+ across realms and undici versions.
44
+ -->
45
+
46
+ * Extends: {Error}
47
+
48
+ The base class for all undici errors. It is reliable with `instanceof` even when
49
+ the error originates from a different undici version, because the check is based
50
+ on a well-known symbol rather than the prototype chain.
51
+
52
+ * `name` {string} Always `'UndiciError'`.
53
+ * `code` {string} Always `'UND_ERR'`.
54
+
55
+ ## Class: `ConnectTimeoutError`
56
+
57
+ <!-- YAML
58
+ added: v1.0.0
59
+ changes:
60
+ - version: v7.16.0
61
+ pr-url: https://github.com/nodejs/undici/pull/4472
62
+ description: Made the error reliable with `instanceof`.
63
+ -->
64
+
65
+ * Extends: {UndiciError}
66
+
67
+ The socket was destroyed because establishing the connection exceeded the
68
+ `connectTimeout` option.
69
+
70
+ * `name` {string} Always `'ConnectTimeoutError'`.
71
+ * `code` {string} Always `'UND_ERR_CONNECT_TIMEOUT'`.
72
+
73
+ When `autoSelectFamily` is enabled and every attempted address times out, Node.js
74
+ raises an `AggregateError`. undici normalizes these multi-address timeouts into a
75
+ `ConnectTimeoutError` so that the error shape is the same regardless of whether
76
+ Node.js's per-address timer or undici's `connectTimeout` wins the race. The
77
+ original `AggregateError` is preserved on `error.cause`.
78
+
79
+ ## Class: `HeadersTimeoutError`
80
+
81
+ <!-- YAML
82
+ added: v1.0.0
83
+ changes:
84
+ - version: v7.16.0
85
+ pr-url: https://github.com/nodejs/undici/pull/4472
86
+ description: Made the error reliable with `instanceof`.
87
+ -->
88
+
89
+ * Extends: {UndiciError}
90
+
91
+ The socket was destroyed because receiving the response headers exceeded the
92
+ `headersTimeout` option.
93
+
94
+ * `name` {string} Always `'HeadersTimeoutError'`.
95
+ * `code` {string} Always `'UND_ERR_HEADERS_TIMEOUT'`.
96
+
97
+ ## Class: `HeadersOverflowError`
98
+
99
+ <!-- YAML
100
+ added: v1.0.0
101
+ changes:
102
+ - version: v7.16.0
103
+ pr-url: https://github.com/nodejs/undici/pull/4472
104
+ description: Made the error reliable with `instanceof`.
105
+ -->
106
+
107
+ * Extends: {UndiciError}
108
+
109
+ The socket was destroyed because the response headers exceeded the maximum
110
+ allowed size.
111
+
112
+ * `name` {string} Always `'HeadersOverflowError'`.
113
+ * `code` {string} Always `'UND_ERR_HEADERS_OVERFLOW'`.
114
+
115
+ ## Class: `BodyTimeoutError`
116
+
117
+ <!-- YAML
118
+ added: v1.0.0
119
+ changes:
120
+ - version: v7.16.0
121
+ pr-url: https://github.com/nodejs/undici/pull/4472
122
+ description: Made the error reliable with `instanceof`.
123
+ -->
124
+
125
+ * Extends: {UndiciError}
126
+
127
+ The socket was destroyed because reading the response body exceeded the
128
+ `bodyTimeout` option.
129
+
130
+ * `name` {string} Always `'BodyTimeoutError'`.
131
+ * `code` {string} Always `'UND_ERR_BODY_TIMEOUT'`.
132
+
133
+ ## Class: `InvalidArgumentError`
134
+
135
+ <!-- YAML
136
+ added: v1.0.0
137
+ changes:
138
+ - version: v7.16.0
139
+ pr-url: https://github.com/nodejs/undici/pull/4472
140
+ description: Made the error reliable with `instanceof`.
141
+ -->
142
+
143
+ * Extends: {UndiciError}
144
+
145
+ An invalid argument was passed to an undici API.
146
+
147
+ * `name` {string} Always `'InvalidArgumentError'`.
148
+ * `code` {string} Always `'UND_ERR_INVALID_ARG'`.
149
+
150
+ ## Class: `InvalidReturnValueError`
151
+
152
+ <!-- YAML
153
+ added: v1.0.0
154
+ changes:
155
+ - version: v7.16.0
156
+ pr-url: https://github.com/nodejs/undici/pull/4472
157
+ description: Made the error reliable with `instanceof`.
158
+ -->
159
+
160
+ * Extends: {UndiciError}
161
+
162
+ A user-supplied callback or interceptor returned an invalid value.
163
+
164
+ * `name` {string} Always `'InvalidReturnValueError'`.
165
+ * `code` {string} Always `'UND_ERR_INVALID_RETURN_VALUE'`.
166
+
167
+ ## Class: `AbortError`
168
+
169
+ <!-- YAML
170
+ added: v1.0.0
171
+ changes:
172
+ - version: v7.16.0
173
+ pr-url: https://github.com/nodejs/undici/pull/4472
174
+ description: Made the error reliable with `instanceof`.
175
+ -->
176
+
177
+ * Extends: {UndiciError}
178
+
179
+ The operation was aborted. This is the base class of [`RequestAbortedError`][].
180
+
181
+ * `name` {string} Always `'AbortError'`.
182
+ * `code` {string} Always `'UND_ERR_ABORT'`.
183
+
184
+ ## Class: `RequestAbortedError`
185
+
186
+ <!-- YAML
187
+ added: v1.0.0
188
+ changes:
189
+ - version: v7.16.0
190
+ pr-url: https://github.com/nodejs/undici/pull/4472
191
+ description: Made the error reliable with `instanceof`.
192
+ -->
193
+
194
+ * Extends: {AbortError}
195
+
196
+ The request was aborted by the user, typically through an `AbortSignal`.
197
+
198
+ * `name` {string} Always `'AbortError'`.
199
+ * `code` {string} Always `'UND_ERR_ABORTED'`.
200
+
201
+ ## Class: `InformationalError`
202
+
203
+ <!-- YAML
204
+ added: v1.0.0
205
+ changes:
206
+ - version: v7.16.0
207
+ pr-url: https://github.com/nodejs/undici/pull/4472
208
+ description: Made the error reliable with `instanceof`.
209
+ -->
210
+
211
+ * Extends: {UndiciError}
212
+
213
+ An expected error carrying a reason, used internally to surface a cause for a
214
+ failed or retried request (for example as the `cause` of another error).
215
+
216
+ * `name` {string} Always `'InformationalError'`.
217
+ * `code` {string} Always `'UND_ERR_INFO'`.
218
+
219
+ ## Class: `RequestContentLengthMismatchError`
220
+
221
+ <!-- YAML
222
+ added: v1.0.0
223
+ changes:
224
+ - version: v7.16.0
225
+ pr-url: https://github.com/nodejs/undici/pull/4472
226
+ description: Made the error reliable with `instanceof`.
227
+ -->
228
+
229
+ * Extends: {UndiciError}
230
+
231
+ The length of the request body did not match the `content-length` header.
232
+
233
+ * `name` {string} Always `'RequestContentLengthMismatchError'`.
234
+ * `code` {string} Always `'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'`.
235
+
236
+ ## Class: `ResponseContentLengthMismatchError`
237
+
238
+ <!-- YAML
239
+ added: v1.0.0
240
+ changes:
241
+ - version: v7.16.0
242
+ pr-url: https://github.com/nodejs/undici/pull/4472
243
+ description: Made the error reliable with `instanceof`.
244
+ -->
245
+
246
+ * Extends: {UndiciError}
247
+
248
+ The length of the response body did not match the `content-length` header.
249
+
250
+ * `name` {string} Always `'ResponseContentLengthMismatchError'`.
251
+ * `code` {string} Always `'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'`.
252
+
253
+ ## Class: `ClientDestroyedError`
254
+
255
+ <!-- YAML
256
+ added: v1.0.0
257
+ changes:
258
+ - version: v7.16.0
259
+ pr-url: https://github.com/nodejs/undici/pull/4472
260
+ description: Made the error reliable with `instanceof`.
261
+ -->
262
+
263
+ * Extends: {UndiciError}
264
+
265
+ An operation was attempted on a client that has already been destroyed.
266
+
267
+ * `name` {string} Always `'ClientDestroyedError'`.
268
+ * `code` {string} Always `'UND_ERR_DESTROYED'`.
269
+
270
+ ## Class: `ClientClosedError`
271
+
272
+ <!-- YAML
273
+ added: v1.0.0
274
+ changes:
275
+ - version: v7.16.0
276
+ pr-url: https://github.com/nodejs/undici/pull/4472
277
+ description: Made the error reliable with `instanceof`.
278
+ -->
279
+
280
+ * Extends: {UndiciError}
281
+
282
+ An operation was attempted on a client that has already been closed.
283
+
284
+ * `name` {string} Always `'ClientClosedError'`.
285
+ * `code` {string} Always `'UND_ERR_CLOSED'`.
286
+
287
+ ## Class: `SocketError`
288
+
289
+ <!-- YAML
290
+ added: v1.0.0
291
+ changes:
292
+ - version: v7.16.0
293
+ pr-url: https://github.com/nodejs/undici/pull/4472
294
+ description: Made the error reliable with `instanceof`.
295
+ -->
296
+
297
+ * Extends: {UndiciError}
298
+
299
+ An error occurred on the underlying socket.
300
+
301
+ * `name` {string} Always `'SocketError'`.
302
+ * `code` {string} Always `'UND_ERR_SOCKET'`.
303
+ * `socket` {SocketInfo|null} Metadata about the socket at the time of the error,
304
+ or `null` when no socket information is available.
305
+
306
+ The `socket` property, when present, holds the following fields:
47
307
 
48
308
  ```ts
49
309
  interface SocketInfo {
@@ -58,4 +318,207 @@ interface SocketInfo {
58
318
  }
59
319
  ```
60
320
 
61
- Be aware that in some cases the `.socket` property can be `null`.
321
+ ## Class: `NotSupportedError`
322
+
323
+ <!-- YAML
324
+ added: v1.0.0
325
+ changes:
326
+ - version: v7.16.0
327
+ pr-url: https://github.com/nodejs/undici/pull/4472
328
+ description: Made the error reliable with `instanceof`.
329
+ -->
330
+
331
+ * Extends: {UndiciError}
332
+
333
+ Unsupported functionality was requested.
334
+
335
+ * `name` {string} Always `'NotSupportedError'`.
336
+ * `code` {string} Always `'UND_ERR_NOT_SUPPORTED'`.
337
+
338
+ ## Class: `BalancedPoolMissingUpstreamError`
339
+
340
+ <!-- YAML
341
+ added: v1.0.0
342
+ changes:
343
+ - version: v7.16.0
344
+ pr-url: https://github.com/nodejs/undici/pull/4472
345
+ description: Made the error reliable with `instanceof`.
346
+ -->
347
+
348
+ * Extends: {UndiciError}
349
+
350
+ No upstream has been added to the [`BalancedPool`][].
351
+
352
+ * `name` {string} Always `'MissingUpstreamError'`.
353
+ * `code` {string} Always `'UND_ERR_BPL_MISSING_UPSTREAM'`.
354
+
355
+ ## Class: `HTTPParserError`
356
+
357
+ <!-- YAML
358
+ added: v4.0.0
359
+ -->
360
+
361
+ * Extends: {Error}
362
+
363
+ An error occurred while parsing the HTTP response. Unlike the other error
364
+ classes, `HTTPParserError` extends {Error} directly rather than
365
+ [`UndiciError`][].
366
+
367
+ * `name` {string} Always `'HTTPParserError'`.
368
+ * `code` {string} An `HPE_`-prefixed parser error code, or `undefined` when no
369
+ code was provided.
370
+ * `data` {string} The raw data associated with the parser failure, or
371
+ `undefined` when none was provided.
372
+
373
+ ## Class: `ResponseExceededMaxSizeError`
374
+
375
+ <!-- YAML
376
+ added: v1.0.0
377
+ changes:
378
+ - version: v7.16.0
379
+ pr-url: https://github.com/nodejs/undici/pull/4472
380
+ description: Made the error reliable with `instanceof`.
381
+ -->
382
+
383
+ * Extends: {UndiciError}
384
+
385
+ The response body exceeded the maximum allowed size.
386
+
387
+ * `name` {string} Always `'ResponseExceededMaxSizeError'`.
388
+ * `code` {string} Always `'UND_ERR_RES_EXCEEDED_MAX_SIZE'`.
389
+
390
+ ## Class: `RequestRetryError`
391
+
392
+ <!-- YAML
393
+ added: v1.0.0
394
+ changes:
395
+ - version: v7.16.0
396
+ pr-url: https://github.com/nodejs/undici/pull/4472
397
+ description: Made the error reliable with `instanceof`.
398
+ -->
399
+
400
+ * Extends: {UndiciError}
401
+
402
+ A request failed and could not be retried, for example because the body is
403
+ stateful (a stream or `AsyncIterable`) and cannot be replayed.
404
+
405
+ * `name` {string} Always `'RequestRetryError'`.
406
+ * `code` {string} Always `'UND_ERR_REQ_RETRY'`.
407
+ * `statusCode` {number} The HTTP status code of the failed response.
408
+ * `data` {Object} Retry metadata.
409
+ * `count` {number} The number of retry attempts that were made.
410
+ * `headers` {Record<string, string|string[]>} The response headers.
411
+
412
+ ### `new RequestRetryError(message, code, options)`
413
+
414
+ * `message` {string} The error message.
415
+ * `code` {number} The HTTP status code of the failed response.
416
+ * `options` {Object}
417
+ * `headers` {Object|string[]|null} The response headers. (optional)
418
+ * `data` {Object|string|null} Retry metadata. (optional)
419
+
420
+ ## Class: `ResponseError`
421
+
422
+ <!-- YAML
423
+ added: v1.0.0
424
+ changes:
425
+ - version: v7.16.0
426
+ pr-url: https://github.com/nodejs/undici/pull/4472
427
+ description: Made the error reliable with `instanceof`.
428
+ -->
429
+
430
+ * Extends: {UndiciError}
431
+
432
+ The response returned an error status code. This is raised, for example, when the
433
+ `throwOnError` option is enabled.
434
+
435
+ * `name` {string} Always `'ResponseError'`.
436
+ * `code` {string} Always `'UND_ERR_RESPONSE'`.
437
+ * `statusCode` {number} The HTTP status code of the response.
438
+ * `body` {Object|string|null} The response body.
439
+ * `headers` {Object|string[]|null} The response headers.
440
+
441
+ ### `new ResponseError(message, code, options)`
442
+
443
+ * `message` {string} The error message.
444
+ * `code` {number} The HTTP status code of the response.
445
+ * `options` {Object}
446
+ * `headers` {Object|string[]|null} The response headers. (optional)
447
+ * `body` {Object|string|null} The response body. (optional)
448
+
449
+ ## Class: `SecureProxyConnectionError`
450
+
451
+ <!-- YAML
452
+ added: v1.0.0
453
+ changes:
454
+ - version: v7.16.0
455
+ pr-url: https://github.com/nodejs/undici/pull/4472
456
+ description: Made the error reliable with `instanceof`.
457
+ -->
458
+
459
+ * Extends: {UndiciError}
460
+
461
+ A TLS connection to a proxy failed.
462
+
463
+ * `name` {string} Always `'SecureProxyConnectionError'`.
464
+ * `code` {string} Always `'UND_ERR_PRX_TLS'`.
465
+ * `cause` {Error} The underlying error that caused the proxy connection to fail.
466
+
467
+ ### `new SecureProxyConnectionError(cause[, message[, options]])`
468
+
469
+ * `cause` {Error} The underlying error. (optional)
470
+ * `message` {string} The error message. (optional)
471
+ * `options` {Object} Additional `Error` options merged with `cause`. (optional)
472
+
473
+ ## Class: `MaxOriginsReachedError`
474
+
475
+ <!-- YAML
476
+ added: v1.0.0
477
+ changes:
478
+ - version: v7.16.0
479
+ pr-url: https://github.com/nodejs/undici/pull/4365
480
+ description: Added to support capping the number of origins in `Agent`.
481
+ -->
482
+
483
+ * Extends: {UndiciError}
484
+
485
+ The maximum number of allowed origins has been reached.
486
+
487
+ * `name` {string} Always `'MaxOriginsReachedError'`.
488
+ * `code` {string} Always `'UND_ERR_MAX_ORIGINS_REACHED'`.
489
+
490
+ ## Class: `Socks5ProxyError`
491
+
492
+ <!-- YAML
493
+ added: v7.23.0
494
+ -->
495
+
496
+ * Extends: {UndiciError}
497
+
498
+ An error occurred during SOCKS5 proxy negotiation.
499
+
500
+ * `name` {string} Always `'Socks5ProxyError'`.
501
+ * `code` {string} The error code. **Default:** `'UND_ERR_SOCKS5'`.
502
+
503
+ ### `new Socks5ProxyError([message[, code]])`
504
+
505
+ * `message` {string} The error message. (optional)
506
+ * `code` {string} The error code. **Default:** `'UND_ERR_SOCKS5'`. (optional)
507
+
508
+ ## Class: `MessageSizeExceededError`
509
+
510
+ <!-- YAML
511
+ added: v1.0.0
512
+ -->
513
+
514
+ * Extends: {UndiciError}
515
+
516
+ A decompressed WebSocket message exceeded the maximum allowed size.
517
+
518
+ * `name` {string} Always `'MessageSizeExceededError'`.
519
+ * `code` {string} Always `'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED'`.
520
+
521
+ [`BalancedPool`]: BalancedPool.md#class-balancedpool
522
+ [`HTTPParserError`]: #class-httpparsererror
523
+ [`RequestAbortedError`]: #class-requestabortederror
524
+ [`UndiciError`]: #class-undicierror