Skip to content

fix: Handle FormData body type correctly in RetryAgent retried requests#4692

Merged
mcollina merged 1 commit intonodejs:mainfrom
eliotschu:fix--retryagent-formdata
Jan 11, 2026
Merged

fix: Handle FormData body type correctly in RetryAgent retried requests#4692
mcollina merged 1 commit intonodejs:mainfrom
eliotschu:fix--retryagent-formdata

Conversation

@eliotschu
Copy link
Contributor

@eliotschu eliotschu commented Dec 6, 2025

This relates to...

Rationale

When a RetryAgent request has FormData body, currently since FormData passes (body && typeof body !== 'string' && !ArrayBuffer.isView(body) && isIterable(body)) it gets converted to BodyAsyncIterable which leads to extractBody() never being called on retried requests. Now FormData body is checked for and returned without manipulation.

Changes

Add a new check on the body using the existing isFormDataLike() utility function. Add a new unit test that references the issue number and runs the retry agent with FormData body.

Features

Bug Fixes

Breaking Changes and Deprecations

Status

Loading
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.

4 participants