Skip to content

Commit

Permalink
fix: no throwing when reading the body
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Jan 31, 2024
1 parent 24b6a9e commit 27d60c3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/loader-recorder-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,7 @@ async function _tryReadBody(res: Response): Promise<string> {
// there are now already multiple places where we're using Promise...
// eslint-disable-next-line compat/compat
return new Promise((resolve, reject) => {
const timeout = setTimeout(
() => reject(new Error('[rrweb/network@1] Timeout while trying to read response body')),
250
)
const timeout = setTimeout(() => resolve('[rrweb/network@1] Timeout while trying to read response body'), 250)
res.clone()
.text()
.then(
Expand Down

0 comments on commit 27d60c3

Please sign in to comment.