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

SystemJS Bare Specifier Error Handling #2312

Closed
stuartcargill opened this issue Mar 23, 2021 · 5 comments
Closed

SystemJS Bare Specifier Error Handling #2312

stuartcargill opened this issue Mar 23, 2021 · 5 comments

Comments

@stuartcargill
Copy link

Hi,

I have an app which gets quite a lot of traffic, sometimes I see issues with the import map being downloaded which results in a unable to resolve bare specifier error.

Is there a way to retry if the import map fails to download? I tried adding the onerror event handler but this doesnt seem to work as the script type is not JavaScript:

<script src="import-map.json" onerror="myFunction()" type="systemjs-importmap"></script>

@guybedford
Copy link
Member

@stuartcargill good suggestion - yes we could support a special onerror callback like this for handling fallbacks. I'd be more than happy to review a PR along those lines / leave this open to track.

@stuartcargill
Copy link
Author

Thanks for the quick reply @guybedford - I'll work on this and create a PR when it's ready.

@QWERTYail
Copy link

Y

@saak23
Copy link

saak23 commented Apr 28, 2021

@guybedford ,
Katie (@kykwak) sent the PR to implement "OnError" callback. Can you please review the request? Thanks
-Saikrishna

@guybedford
Copy link
Member

Fixed in #2324.

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

No branches or pull requests

4 participants