Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(loaders): properly catches render errors and call onError callback #18

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

daniele-pelagatti
Copy link
Contributor

related issue: #16

the problem is caused by the fact that an empty string or any other "real-file-but-not-an-image" (an empty string is a request to load index.html basically) gets fulfilled by the server with a 200 OK status, returned by FileLoader -> we get the HTML in return (which is not an image) and then we try to render it anyway.

this catches errors in the LoaderBase render function and properly calls the onError callback

@daniele-pelagatti daniele-pelagatti merged commit b9bcdd1 into main Nov 29, 2023
11 checks passed
@daniele-pelagatti daniele-pelagatti deleted the feature/throw-on-render-error branch November 29, 2023 14:02
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.

1 participant