{
  "type": "module",
  "source": "doc/api/api-errors.md",
  "modules": [
    {
      "textRaw": "Errors",
      "name": "errors",
      "introduced_in": "v1.0.0",
      "type": "module",
      "stability": 2,
      "stabilityText": "Stable",
      "desc": "<p>undici raises typed error objects so that failures can be distinguished\nprogrammatically. Every error class is exposed through the <code>errors</code> namespace of\nthe package:</p>\n<pre><code class=\"language-js\">import { errors } from 'undici'\n\nif (err instanceof errors.ConnectTimeoutError) {\n  // handle connect timeout\n}\n</code></pre>\n<p>All errors, except <a href=\"#class-httpparsererror\"><code>HTTPParserError</code></a>, extend <a href=\"#class-undicierror\"><code>UndiciError</code></a>. Each error\ncarries a stable <code>code</code> string (for example <code>UND_ERR_CONNECT_TIMEOUT</code>) and a\n<code>name</code>.</p>\n<p>Because the bundled (global) dispatcher may come from a different undici version\nthan the one you import directly, prefer matching on <code>error.code</code> rather than\n<code>instanceof errors.UndiciError</code>:</p>\n<pre><code class=\"language-js\">if (err.code === 'UND_ERR_CONNECT_TIMEOUT') {\n  // handle connect timeout\n}\n</code></pre>",
      "classes": [
        {
          "textRaw": "Class: `UndiciError`",
          "name": "UndiciError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made `UndiciError` and its subclasses reliable with `instanceof` across realms and undici versions."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error\"><code>&#x3C;Error></code></a></li>\n</ul>\n<p>The base class for all undici errors. It is reliable with <code>instanceof</code> even when\nthe error originates from a different undici version, because the check is based\non a well-known symbol rather than the prototype chain.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UndiciError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `ConnectTimeoutError`",
          "name": "ConnectTimeoutError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>The socket was destroyed because establishing the connection exceeded the\n<code>connectTimeout</code> option.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'ConnectTimeoutError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_CONNECT_TIMEOUT'</code>.</li>\n</ul>\n<p>When <code>autoSelectFamily</code> is enabled and every attempted address times out, Node.js\nraises an <code>AggregateError</code>. undici normalizes these multi-address timeouts into a\n<code>ConnectTimeoutError</code> so that the error shape is the same regardless of whether\nNode.js's per-address timer or undici's <code>connectTimeout</code> wins the race. The\noriginal <code>AggregateError</code> is preserved on <code>error.cause</code>.</p>"
        },
        {
          "textRaw": "Class: `HeadersTimeoutError`",
          "name": "HeadersTimeoutError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>The socket was destroyed because receiving the response headers exceeded the\n<code>headersTimeout</code> option.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'HeadersTimeoutError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_HEADERS_TIMEOUT'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `HeadersOverflowError`",
          "name": "HeadersOverflowError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>The socket was destroyed because the response headers exceeded the maximum\nallowed size.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'HeadersOverflowError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_HEADERS_OVERFLOW'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `BodyTimeoutError`",
          "name": "BodyTimeoutError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>The socket was destroyed because reading the response body exceeded the\n<code>bodyTimeout</code> option.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'BodyTimeoutError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_BODY_TIMEOUT'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `InvalidArgumentError`",
          "name": "InvalidArgumentError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>An invalid argument was passed to an undici API.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'InvalidArgumentError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_INVALID_ARG'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `InvalidReturnValueError`",
          "name": "InvalidReturnValueError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>A user-supplied callback or interceptor returned an invalid value.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'InvalidReturnValueError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_INVALID_RETURN_VALUE'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `AbortError`",
          "name": "AbortError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>The operation was aborted. This is the base class of <a href=\"#class-requestabortederror\"><code>RequestAbortedError</code></a>.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'AbortError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_ABORT'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `RequestAbortedError`",
          "name": "RequestAbortedError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-aborterror\"><code>&#x3C;AbortError></code></a></li>\n</ul>\n<p>The request was aborted by the user, typically through an <code>AbortSignal</code>.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'AbortError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_ABORTED'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `InformationalError`",
          "name": "InformationalError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>An expected error carrying a reason, used internally to surface a cause for a\nfailed or retried request (for example as the <code>cause</code> of another error).</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'InformationalError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_INFO'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `RequestContentLengthMismatchError`",
          "name": "RequestContentLengthMismatchError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>The length of the request body did not match the <code>content-length</code> header.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'RequestContentLengthMismatchError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `ResponseContentLengthMismatchError`",
          "name": "ResponseContentLengthMismatchError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>The length of the response body did not match the <code>content-length</code> header.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'ResponseContentLengthMismatchError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `ClientDestroyedError`",
          "name": "ClientDestroyedError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>An operation was attempted on a client that has already been destroyed.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'ClientDestroyedError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_DESTROYED'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `ClientClosedError`",
          "name": "ClientClosedError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>An operation was attempted on a client that has already been closed.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'ClientClosedError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_CLOSED'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `SocketError`",
          "name": "SocketError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>An error occurred on the underlying socket.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'SocketError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_SOCKET'</code>.</li>\n<li><code>socket</code> <a href=\"Errors.md#new-requestretryerrormessage-code-options\"><code>&#x3C;SocketInfo></code></a> | <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#null_type\"><code>&#x3C;null></code></a> Metadata about the socket at the time of the error,\nor <code>null</code> when no socket information is available.</li>\n</ul>\n<p>The <code>socket</code> property, when present, holds the following fields:</p>\n<pre><code class=\"language-ts\">interface SocketInfo {\n  localAddress?: string\n  localPort?: number\n  remoteAddress?: string\n  remotePort?: number\n  remoteFamily?: string\n  timeout?: number\n  bytesWritten?: number\n  bytesRead?: number\n}\n</code></pre>"
        },
        {
          "textRaw": "Class: `NotSupportedError`",
          "name": "NotSupportedError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>Unsupported functionality was requested.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'NotSupportedError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_NOT_SUPPORTED'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `BalancedPoolMissingUpstreamError`",
          "name": "BalancedPoolMissingUpstreamError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>No upstream has been added to the <a href=\"BalancedPool.html#class-balancedpool\"><code>BalancedPool</code></a>.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'MissingUpstreamError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_BPL_MISSING_UPSTREAM'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `HTTPParserError`",
          "name": "HTTPParserError",
          "type": "class",
          "meta": {
            "added": [
              "v4.0.0"
            ],
            "changes": []
          },
          "desc": "<ul>\n<li>Extends: <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error\"><code>&#x3C;Error></code></a></li>\n</ul>\n<p>An error occurred while parsing the HTTP response. Unlike the other error\nclasses, <code>HTTPParserError</code> extends <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error\"><code>&#x3C;Error></code></a> directly rather than <a href=\"#class-undicierror\"><code>UndiciError</code></a>.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'HTTPParserError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> An <code>HPE_</code>-prefixed parser error code, or <code>undefined</code> when no\ncode was provided.</li>\n<li><code>data</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> The raw data associated with the parser failure, or <code>undefined</code> when none was provided.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `ResponseExceededMaxSizeError`",
          "name": "ResponseExceededMaxSizeError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>The response body exceeded the maximum allowed size.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'ResponseExceededMaxSizeError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_RES_EXCEEDED_MAX_SIZE'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `RequestRetryError`",
          "name": "RequestRetryError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>A request failed and could not be retried, for example because the body is\nstateful (a stream or <code>AsyncIterable</code>) and cannot be replayed.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'RequestRetryError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_REQ_RETRY'</code>.</li>\n<li><code>statusCode</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type\"><code>&#x3C;number></code></a> The HTTP status code of the failed response.</li>\n<li><code>data</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\"><code>&#x3C;Object></code></a> Retry metadata.\n<ul>\n<li><code>count</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type\"><code>&#x3C;number></code></a> The number of retry attempts that were made.</li>\n</ul>\n</li>\n<li><code>headers</code> <a href=\"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type\"><code>&#x3C;Record></code></a>&#x3C;<a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a>, <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> | <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a>[]> The response headers.</li>\n</ul>",
          "signatures": [
            {
              "textRaw": "`new RequestRetryError(message, code, options)`",
              "name": "RequestRetryError",
              "type": "ctor",
              "params": [
                {
                  "textRaw": "`message` {string} The error message.",
                  "name": "message",
                  "type": "string",
                  "desc": "The error message."
                },
                {
                  "textRaw": "`code` {number} The HTTP status code of the failed response.",
                  "name": "code",
                  "type": "number",
                  "desc": "The HTTP status code of the failed response."
                },
                {
                  "textRaw": "`options` {Object}",
                  "name": "options",
                  "type": "Object",
                  "options": [
                    {
                      "textRaw": "`headers` {Object|string}[] | {null} The response headers. (optional)",
                      "name": "headers",
                      "type": "Object|string",
                      "desc": "[] | {null} The response headers. (optional)"
                    },
                    {
                      "textRaw": "`data` {Object|string|null} Retry metadata. (optional)",
                      "name": "data",
                      "type": "Object|string|null",
                      "desc": "Retry metadata. (optional)"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "textRaw": "Class: `ResponseError`",
          "name": "ResponseError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>The response returned an error status code. This is raised, for example, when the\n<code>throwOnError</code> option is enabled.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'ResponseError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_RESPONSE'</code>.</li>\n<li><code>statusCode</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type\"><code>&#x3C;number></code></a> The HTTP status code of the response.</li>\n<li><code>body</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\"><code>&#x3C;Object></code></a> | <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> | <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#null_type\"><code>&#x3C;null></code></a> The response body.</li>\n<li><code>headers</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\"><code>&#x3C;Object></code></a> | <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a>[] | <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#null_type\"><code>&#x3C;null></code></a> The response headers.</li>\n</ul>",
          "signatures": [
            {
              "textRaw": "`new ResponseError(message, code, options)`",
              "name": "ResponseError",
              "type": "ctor",
              "params": [
                {
                  "textRaw": "`message` {string} The error message.",
                  "name": "message",
                  "type": "string",
                  "desc": "The error message."
                },
                {
                  "textRaw": "`code` {number} The HTTP status code of the response.",
                  "name": "code",
                  "type": "number",
                  "desc": "The HTTP status code of the response."
                },
                {
                  "textRaw": "`options` {Object}",
                  "name": "options",
                  "type": "Object",
                  "options": [
                    {
                      "textRaw": "`headers` {Object|string}[] | {null} The response headers. (optional)",
                      "name": "headers",
                      "type": "Object|string",
                      "desc": "[] | {null} The response headers. (optional)"
                    },
                    {
                      "textRaw": "`body` {Object|string|null} The response body. (optional)",
                      "name": "body",
                      "type": "Object|string|null",
                      "desc": "The response body. (optional)"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "textRaw": "Class: `SecureProxyConnectionError`",
          "name": "SecureProxyConnectionError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4472",
                "description": "Made the error reliable with `instanceof`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>A TLS connection to a proxy failed.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'SecureProxyConnectionError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_PRX_TLS'</code>.</li>\n<li><code>cause</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error\"><code>&#x3C;Error></code></a> The underlying error that caused the proxy connection to fail.</li>\n</ul>",
          "signatures": [
            {
              "textRaw": "`new SecureProxyConnectionError(cause[, message[, options]])`",
              "name": "SecureProxyConnectionError",
              "type": "ctor",
              "params": [
                {
                  "textRaw": "`cause` {Error} The underlying error. (optional)",
                  "name": "cause",
                  "type": "Error",
                  "desc": "The underlying error. (optional)"
                },
                {
                  "textRaw": "`message` {string} The error message. (optional)",
                  "name": "message",
                  "type": "string",
                  "desc": "The error message. (optional)",
                  "optional": true
                },
                {
                  "textRaw": "`options` {Object} Additional `Error` options merged with `cause`. (optional)",
                  "name": "options",
                  "type": "Object",
                  "desc": "Additional `Error` options merged with `cause`. (optional)",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "Class: `MaxOriginsReachedError`",
          "name": "MaxOriginsReachedError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": [
              {
                "version": "v7.16.0",
                "pr-url": "https://github.com/nodejs/undici/pull/4365",
                "description": "Added to support capping the number of origins in `Agent`."
              }
            ]
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>The maximum number of allowed origins has been reached.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'MaxOriginsReachedError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_MAX_ORIGINS_REACHED'</code>.</li>\n</ul>"
        },
        {
          "textRaw": "Class: `Socks5ProxyError`",
          "name": "Socks5ProxyError",
          "type": "class",
          "meta": {
            "added": [
              "v7.23.0"
            ],
            "changes": []
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>An error occurred during SOCKS5 proxy negotiation.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'Socks5ProxyError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> The error code. <strong>Default:</strong> <code>'UND_ERR_SOCKS5'</code>.</li>\n</ul>",
          "signatures": [
            {
              "textRaw": "`new Socks5ProxyError([message[, code]])`",
              "name": "Socks5ProxyError",
              "type": "ctor",
              "params": [
                {
                  "textRaw": "`message` {string} The error message. (optional)",
                  "name": "message",
                  "type": "string",
                  "desc": "The error message. (optional)",
                  "optional": true
                },
                {
                  "textRaw": "`code` {string} The error code. **Default:** `'UND_ERR_SOCKS5'`. (optional)",
                  "name": "code",
                  "type": "string",
                  "default": "`'UND_ERR_SOCKS5'`. (optional)",
                  "desc": "The error code.",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "Class: `MessageSizeExceededError`",
          "name": "MessageSizeExceededError",
          "type": "class",
          "meta": {
            "added": [
              "v1.0.0"
            ],
            "changes": []
          },
          "desc": "<ul>\n<li>Extends: <a href=\"Errors.md#class-undicierror\"><code>&#x3C;UndiciError></code></a></li>\n</ul>\n<p>A decompressed WebSocket message exceeded the maximum allowed size.</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'MessageSizeExceededError'</code>.</li>\n<li><code>code</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> Always <code>'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED'</code>.</li>\n</ul>"
        }
      ]
    }
  ]
}