Repository navigation
docs: add missing error codes to the error tables - #11429
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
[Low impact] The PR appears safe to merge, with one non-blocking wording issue remaining. Findings
Fix with agent prompt### Issue 1
README.md:undefined-1530
The added clause makes `maxDepth` sound configurable for `axios.formToJSON()` too. That path uses a fixed 100-level limit; changing `formSerializer.maxDepth` or `paramsSerializer.maxDepth` cannot raise it. Separate the two cases so readers do not try settings that cannot fix their parsing error.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds missing error codes to the documentation.
Reviews (3) · Last reviewed commit: "chore: apply suggestion from @cubic-dev-..." · Reviewed by Greptile |
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Re-trigger cubic
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
jasonsaayman
left a comment
There was a problem hiding this comment.
thanks for this contribution
| | ERR_FR_TOO_MANY_REDIRECTS | Request exceeded the configured maximum number of redirects. | | ||
| | ERR_BAD_RESPONSE | Response cannot be parsed properly or is in an unexpected format. Usually related to a response with `5xx` status code. | | ||
| | ERR_BAD_REQUEST | The request has an unexpected format or is missing required parameters. Usually related to a response with `4xx` status code. | | ||
| | ERR_FORM_DATA_DEPTH_EXCEEDED | An object exceeds the configured `maxDepth` while serializing `params` or form data, or while parsing deeply nested FormData fields. Default limit is 100 levels. | |
There was a problem hiding this comment.
Parsing depth is not configurable
The added clause makes maxDepth sound configurable for axios.formToJSON() too. That path uses a fixed 100-level limit; changing formSerializer.maxDepth or paramsSerializer.maxDepth cannot raise it. Separate the two cases so readers do not try settings that cannot fix their parsing error.
Knowledge Base Used: Request body and form serialization
Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 1530
Comment:
**Parsing depth is not configurable**
The added clause makes `maxDepth` sound configurable for `axios.formToJSON()` too. That path uses a fixed 100-level limit; changing `formSerializer.maxDepth` or `paramsSerializer.maxDepth` cannot raise it. Separate the two cases so readers do not try settings that cannot fix their parsing error.
**Knowledge Base Used:** [Request body and form serialization](https://app.greptile.com/-/switch-tenant?tenant=axios&next=%2Fcustom-context%2Fknowledge-base%2Faxios%2Faxios%2F-%2Fdocs%2Frequest-body-and-form-serialization.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [axios](https://axios-http.com) ([source](https://github.com/axios/axios)) | [`1.21.0` → `1.21.1`](https://renovatebot.com/diffs/npm/axios/1.21.0/1.21.1) |  |  | --- >⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/2097) for more information. --- ### Release Notes <details> <summary>axios/axios (axios)</summary> ### [`v1.21.1`](https://github.com/axios/axios/releases/tag/v1.21.1) [Compare Source](axios/axios@v1.21.0...v1.21.1) #### v1.21.1 — November 9, 2026 This release raises the minimum `follow-redirects` version to fix a published CVE, fixes a Next.js prerendering failure caused by the response duration timer, corrects the `getAdapter` typings, and includes documentation corrections, new test coverage, CI runner changes and dependency updates. #### 🔒 Security Fixes - **follow-redirects:** Raised the `follow-redirects` range from `^1.16.0` to `^1.16.2` to fix CVE-2026-116689 (GHSA-mrwp-f3q8-3g9p). In the vulnerable versions, `sensitiveHeaders` arrays from another realm were ignored and custom credentials could follow redirects. Only the Node.js HTTP adapter is affected, and there are no API changes. (**[#​11410](axios/axios#11410) #### 🐛 Bug Fixes - **Response Duration:** `dispatchRequest` now measures `response.duration` with `performance.now()` and uses `Date.now()` only when `performance.now()` isn't available. In v1.21.0, any axios request from a Server Component failed Next.js production builds with Cache Components (`cacheComponents: true`), because Next.js rejects `Date.now()` while prerendering. The duration is still a whole number of milliseconds, and system clock changes no longer affect it. (**[#​11411](axios/axios#11411) - **TypeScript:** `getAdapter` now accepts an optional `config?: AxiosRequestConfig` in `index.d.ts` and `index.d.cts`, matching what it does at runtime. You can now call `getAdapter('fetch', { env: { fetch: myFetch } })` without a cast. (**[#​11404](axios/axios#11404) #### 🔧 Maintenance & Chores - **Documentation Corrections:** Brought the README and docs site in line with how axios actually behaves: - `transformRequest` runs for every method, and transformers receive `(data, headers, status)`. - `responseType` and `Content-Type` have no default value. - `AxiosHeaders#get` and `#normalize` are described correctly. - Errors should be identified with `axios.isAxiosError()`, not by `name`. - The error tables now list `ECONNREFUSED` and `ERR_FORM_DATA_DEPTH_EXCEEDED`, and note that FormData parsing has a fixed depth limit that `maxDepth` doesn't change. - New notes cover what `redact` doesn't scan, which adapters enforce `maxContentLength` / `maxBodyLength`, and how `formToJSON()` handles field name collisions. (**[#​11374](axios/axios#11374, **[#​11373](axios/axios#11373, **[#​11389](axios/axios#11389, **[#​11419](axios/axios#11419, **[#​11429](axios/axios#11429, **[#​11430](axios/axios#11430) - **Docs Site:** Added a Partners page, a shared card design for sponsors and partners, a Namespace sponsor badge, and a blog whose first post announces HeroDevs Never-Ending Support for Axios v0. Also applied the v1.20.0/v1.21.0 release notes to the docs, and fixed internal links in the es, fr and zh translations so they keep their locale prefix. (**[#​11390](axios/axios#11390, **[#​11399](axios/axios#11399, **[#​11400](axios/axios#11400, **[#​11412](axios/axios#11412, **[#​11401](axios/axios#11401) - **Test Coverage:** Added cancellation tests across the HTTP, fetch and XHR adapters. They cover `AbortSignal`, `CancelToken`, cancelling while a request interceptor is pending, and timeout precedence. Also added tests for `no_proxy` edge cases in `shouldBypassProxy`, such as internationalized domain names, malformed CIDR and IPv4 entries, and port-qualified entries. Neither changes runtime behavior. (**[#​11376](axios/axios#11376, **[#​11431](axios/axios#11431) - **CI:** GitHub Actions jobs now run on Namespace runners. The npm publish job stays on GitHub-hosted runners, because npm provenance and trusted publishing (OIDC) only work there. (**[#​11396](axios/axios#11396) - **Dependencies:** Updated development and tooling dependencies, including `vitest` and `@vitest/*` (to 5.x at the root), `typescript` (7.x at the root), `vite`, `rollup`, `eslint`, `playwright`, `@commitlint/*`, `@rollup/plugin-alias`, `@rollup/plugin-terser`, `body-parser`, `multer`, `serialize-javascript`, `fast-uri`, `qs`, `zizmorcore/zizmor-action`, and `follow-redirects` in `/docs`. (**[#​11383](axios/axios#11383, **[#​11375](axios/axios#11375, **[#​11372](axios/axios#11372, **[#​11345](axios/axios#11345, **[#​11392](axios/axios#11392, **[#​11387](axios/axios#11387, **[#​11386](axios/axios#11386, **[#​11385](axios/axios#11385, **[#​11391](axios/axios#11391, **[#​11388](axios/axios#11388, **[#​11395](axios/axios#11395, **[#​11421](axios/axios#11421, **[#​11422](axios/axios#11422, **[#​11426](axios/axios#11426) - **Release:** Prepared the 1.21.1 release. (**[#​11435](axios/axios#11435) #### 🌟 New Contributors We are thrilled to welcome our new contributors. Thank you for helping improve axios: - **[@​Ghoscro](https://github.com/Ghoscro)** (**[#​11374](axios/axios#11374) - **[@​pei711](https://github.com/pei711)** (**[#​11373](axios/axios#11373) - **[@​ivanhapaz](https://github.com/ivanhapaz)** (**[#​11399](axios/axios#11399) - **[@​aelmanaa](https://github.com/aelmanaa)** (**[#​11404](axios/axios#11404) - **[@​Aryapatel-007](https://github.com/Aryapatel-007)** (**[#​11429](axios/axios#11429, **[#​11430](axios/axios#11430) - **[@​umair-ghafoor-ai](https://github.com/umair-ghafoor-ai)** (**[#​11376](axios/axios#11376) - **[@​yxshee](https://github.com/yxshee)** (**[#​11389](axios/axios#11389) - **[@​malinele](https://github.com/malinele)** (**[#​11401](axios/axios#11401) - **[@​AnantDuhan](https://github.com/AnantDuhan)** (**[#​11431](axios/axios#11431) [Full Changelog](axios/axios@v1.21.0...v1.21.1) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 9am on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjcuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjIyNy40IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2336
Summary
The error code tables are missing two codes that axios can produce:
ECONNREFUSEDhas been a public constant onAxiosError(lib/core/AxiosError.js,index.d.ts,index.d.cts), andtests/unit/adapters/errorDetails.test.jsasserts it on a refused connection, but it isn't in the README table or in any of the error-handling guides.ERR_FORM_DATA_DEPTH_EXCEEDEDis in all four guides but not in the README table.Linked issue
None. Docs-only gap found by comparing the codes in
lib/core/AxiosError.jswith the tables.Changes
ECONNREFUSEDrow to the README and the English, Spanish, French and Chinese error-handling guides.ERR_FORM_DATA_DEPTH_EXCEEDEDrow to the README, using the wording from the English guide.PRE_RELEASE_CHANGELOG.mdentry under Documentation.The new row says the code is adapter-specific, based on the source and tests: the Node
httpadapter passes the system code throughAxiosError.from(lib/adapters/http.js) and keeps the original error onerror.cause, whilexhrandfetchuseERR_NETWORK(lib/adapters/xhr.js,lib/adapters/fetch.js, and thefetch.test.jscase where an underlyingECONNREFUSEDsurfaces asERR_NETWORK).Validation
No commands were run. This is a docs-only change, so per
AGENTS.mdI did not run runtime checks. The claims were checked by reading the source and tests listed above. The docs site build was not run either, so CI is the first render check.Compatibility and documentation
Patch-level documentation only, with no runtime, public API or type change.
ECONNREFUSEDis already released, so this documents existing behaviour and needs noPRE_RELEASE_DOCS.mdentry.The Spanish, French and Chinese rows are machine translations and would benefit from a fluent reader's check.
Checklist
PRE_RELEASE_CHANGELOG.mdentry added or updated (or AGENTS.md's automated release-preparation exception explained)AI disclosure: this PR, including its description and translations, was generated by Claude Code (Claude Opus 5.5). If the
ai-assistedlabel is not on this PR, a maintainer needs to apply it, because an outside contributor may not be able to.🤖 Generated with Claude Code
Summary by cubic
Description
Adds the two error codes missing from axios's error code tables.
ECONNREFUSEDis now in the README and the English, Spanish, French, and Chinese error-handling guides. It was already a public constant onAxiosErrorand asserted in tests, but never documented.ERR_FORM_DATA_DEPTH_EXCEEDEDis now in the README, using the wording from the English guide where it already appeared.ECONNREFUSEDrow notes it is set by the Node.jshttpadapter (with the original system error onerror.cause), while thexhrandfetchadapters reportERR_NETWORKinstead. APRE_RELEASE_CHANGELOG.mdentry was added under Documentation.The Spanish, French, and Chinese rows are machine translations and would benefit from a check by a fluent reader.
Docs
This PR is itself a documentation update, covering the README and the four error-handling guides.
Testing
No tests were added or modified; this is a docs-only change. The accuracy of the
ECONNREFUSEDrow was verified against the adapter source and existing unit tests.Semantic version impact
Patch. Documentation only; no runtime, public API, or type changes.
ECONNREFUSEDis already released, so this documents existing behavior.Written for commit 1fb7d98. Summary will update on new commits.