Skip to content

Conversation

@nidishk
Copy link
Contributor

@nidishk nidishk commented Jan 28, 2026

🔖 Title
Add AbortController support for cancelling uploads

📝 Description
This PR adds AbortController / AbortSignal support to bee-js, allowing users to cancel in-progress HTTP requests using the standard browser/Node.js abort API.

Changes

  • Added pre-request check for already-aborted signals (throws immediately)
  • Added abort check in retry loop to respect abort during retries
  • Added explicit signal forwarding to Axios (deepMerge doesn't handle AbortSignal correctly)
  • Added ERR_CANCELED error handling to throw BeeResponseError on abort

🧪 How Has This Been Tested?
✅ Unit tests
✅ Integration tests
✅ Live verification on mainnet node

@nidishk nidishk requested review from Cafe137 and bosi95 February 2, 2026 08:50
@Cafe137 Cafe137 changed the title feat: add AbortController support for cancelling uploads feat!: add AbortController support for cancelling uploads Feb 2, 2026
public responseBody?: unknown,
public status?: number,
public statusText?: string,
public code?: string,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a breaking change so we will need to check with downstream projects if we can proceed with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants