Skip to content

docs(readme): add timeout guidance to first async example#10759

Merged
jasonsaayman merged 4 commits intoaxios:v1.xfrom
tboyila:docs/axios-contrib-improvements
Apr 26, 2026
Merged

docs(readme): add timeout guidance to first async example#10759
jasonsaayman merged 4 commits intoaxios:v1.xfrom
tboyila:docs/axios-contrib-improvements

Conversation

@tboyila
Copy link
Copy Markdown
Contributor

@tboyila tboyila commented Apr 19, 2026

What changed

README examples now show:

  • timeout: 5000 in the first async example
  • timeout in the promise example
  • a note explaining why timeouts matter in production

Why

A common real-world mistake is leaving HTTP requests without timeouts, causing them to hang indefinitely. Adding timeout examples helps users adopt safer defaults.


Summary by cubic

Adds timeout guidance to the README and getting-started docs to encourage safer axios defaults and prevent hanging requests. Examples now set timeout: 5000 and link to matching error handling.

Description

  • README.md: add timeout: 5000 to the Promise-based axios example and a short note under async examples linking to “Handling Timeouts”.
  • /docs/pages/getting-started/first-steps.md: add a “Set a timeout in production” tip with an example and links to request config timeout and error handling (ECONNABORTED / ETIMEDOUT).
  • Reasoning: requests without timeouts can hang; examples now promote safer defaults.
  • Testing: docs-only; no tests needed.

Semantic version impact

  • None (documentation-only).

Written for commit 02ff2e4. Summary will update on new commits.

@tboyila tboyila requested a review from jasonsaayman as a code owner April 19, 2026 13:23
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@jasonsaayman jasonsaayman added priority::low A low priority issue commit::docs The PR is related to docs labels Apr 26, 2026
@jasonsaayman jasonsaayman merged commit 2f89ce6 into axios:v1.x Apr 26, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit::docs The PR is related to docs priority::low A low priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants