Skip to content

FileLoader: Make sure all network errors are catched in load().#28216

Merged
mrdoob merged 1 commit into
mrdoob:devfrom
ycw:quickfix-fileloader
Apr 27, 2024
Merged

FileLoader: Make sure all network errors are catched in load().#28216
mrdoob merged 1 commit into
mrdoob:devfrom
ycw:quickfix-fileloader

Conversation

@ycw
Copy link
Copy Markdown
Contributor

@ycw ycw commented Apr 25, 2024

Related: #24450

Problem:
FileLoader ignores edge cases like ... server down when response body still in progress ... in turns uncaught rejection

Solution:
This PR voids the readable stream for those edge cases s.t. it will enter catch() eventually.

@github-actions
Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
674.4 kB (167.1 kB) 674.4 kB (167.1 kB) +18 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
453.8 kB (109.6 kB) 453.8 kB (109.6 kB) +0 B

@Mugen87 Mugen87 added this to the r164 milestone Apr 25, 2024
Mugen87
Mugen87 previously approved these changes Apr 25, 2024
Comment thread src/loaders/FileLoader.js
@Mugen87 Mugen87 removed this from the r164 milestone Apr 25, 2024
@Mugen87 Mugen87 added this to the r165 milestone Apr 27, 2024
@Mugen87 Mugen87 changed the title Fixed edge cases in FileLoader FileLoader: Make sure all network errors are catched in load(). Apr 27, 2024
@mrdoob mrdoob merged commit 16128f5 into mrdoob:dev Apr 27, 2024
@ycw ycw deleted the quickfix-fileloader branch April 28, 2024 07:30
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