-
Notifications
You must be signed in to change notification settings - Fork 479
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
Comments
@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. |
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. |
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. |
When the text plugin decides to load the
.js
version of a resource (due touseXhr
returningfalse
), 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 ofwaitSeconds
, which will never timeout if set to0
.The fix seems simple enough: the (delegate) call to
req
(currently at line 216 of text.js) could simply takeonLoad.error
as error handler.Note: while the defect description looks very similar to #133 it is a different issue.
The text was updated successfully, but these errors were encountered: