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

CORS module load fallback does not propagate errors #139

Open
rphilipp64 opened this issue Apr 24, 2019 · 3 comments
Open

CORS module load fallback does not propagate errors #139

rphilipp64 opened this issue Apr 24, 2019 · 3 comments

Comments

@rphilipp64
Copy link
Contributor

rphilipp64 commented Apr 24, 2019

When the text plugin decides to load the .js version of a resource (due to useXhr returning false), load errors are not propagated back to error handler of the require call. With the current implementation users of the text plugin are at the mercy of waitSeconds, which will never timeout if set to 0.

The fix seems simple enough: the (delegate) call to req (currently at line 216 of text.js) could simply take onLoad.error as error handler.

Note: while the defect description looks very similar to #133 it is a different issue.

@rphilipp64
Copy link
Contributor Author

@jrburke Could you please comment if this issue is feasible to fix anytime soon? It would severely improve the error handling path of the text plugin for CORS scenarios.
(Apologies for the mention to grab your attention).

@jrburke
Copy link
Member

jrburke commented Apr 30, 2019

I am not very active for these projects, they are mostly in low maintenance mode. If you want to test out the change to prove out the solution you propose, feel free to put up a pull request. It sounds like the change is pretty small, so should be straightforward to merge.

If that is not an option due to any work open source policies, you could keep a fork of the project for yourself with the change. This code is very rarely modified these days.

@rphilipp64
Copy link
Contributor Author

Thank you for the quick reply. I've created Pull Request #140 for your review.

My team does not own the application hosting the component we create, nor its requirejs configuration. It's also the application that provides the version of the text plugin used. It would be best if we can simply message that team to use the latest official version of the text plugin, instead of pointing them to my fork.

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

2 participants