Files
cherenkov 37c50108aa fix(client): retry requests with a body after a token refresh (#2556)
* fix(client): retry requests with a body after a token refresh

refreshInterceptor derived its retry from the request it had already
sent. A request body can only be read once, so every retried POST/PUT
threw "Cannot construct a Request with a Request object that has already
been used" -- which is what CLI users see on the first content
create/update after the stored access token expires.

Keep a clone taken before the first attempt and rebuild the retry from
that. GET requests never hit this, which is why the existing test (a
bodyless retry whose mock backend never reads the body) passed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs(client): trim the retry-clone comment to the non-obvious fact

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 15:20:39 +00:00
..
2026-08-24 15:11:54 +01:00
2026-08-24 15:11:54 +01:00
2026-08-24 15:11:54 +01:00
2026-08-24 15:11:54 +01:00
2026-08-18 13:26:49 +01:00
2026-08-24 15:11:54 +01:00
2026-07-21 11:26:37 +01:00
2026-07-21 11:26:37 +01:00
2026-07-21 11:26:37 +01:00
2026-08-24 15:11:54 +01:00
2026-08-24 15:11:54 +01:00