Skip to content

Commit 95d81e1

Browse files
authored
Body unusable auth error (#11550)
* fix(wrangler): remove fetchAuthToken's early response.text() for logging * chore: add changeset
1 parent a1a8824 commit 95d81e1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.changeset/tiny-llamas-chew.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
Fix "TypeError: Body is unusable: Body has already been read" when failing to exchange oauth code because of double `response.text()`.

packages/wrangler/src/user/user.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,8 +1382,7 @@ async function fetchAuthToken(body: URLSearchParams) {
13821382
logger.error(
13831383
"Failed to fetch auth token:",
13841384
response.status,
1385-
response.statusText,
1386-
await response.text()
1385+
response.statusText
13871386
);
13881387
}
13891388
return response;

0 commit comments

Comments
 (0)