mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(ff): throw friendly message on fetching redirect body (#8594)
This commit is contained in:
parent
74e6f2756a
commit
0e6620ce94
@ -418,7 +418,7 @@ export class Response extends SdkObject {
|
||||
body(): Promise<Buffer> {
|
||||
if (!this._contentPromise) {
|
||||
this._contentPromise = this._finishedPromise.then(async () => {
|
||||
if (this._request._redirectedTo)
|
||||
if (this._status >= 300 && this._status <= 399)
|
||||
throw new Error('Response body is unavailable for redirect responses');
|
||||
return this._getResponseBodyCallback();
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user