Skip to content

Ajax.activeRequestCount doesn't decrease when error in onComplete callback #324

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

Closed
jalgaba opened this issue Dec 3, 2016 · 0 comments
Closed
Labels
Milestone

Comments

@jalgaba
Copy link

jalgaba commented Dec 3, 2016

new Ajax.Request('/ajax,html',
{
    onComplete: function () {
        ({}).abc.xyz; //Error on purpose. but nothing reported to browser console
        console.log('This message never logs.');
    }
});
//All ajax finished, but Ajax.activeRequestCount is stuck at "1"

Not only that. But the browser console doesn't show any error/warning. My current workaround is wrapping all the callback's content in a try-catch and reporting the error to the console myself.

Using 1.7.3
Tested Chrome 54 and Firefox 52

@savetheclocktower savetheclocktower added this to the 1.7.4 milestone Apr 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants