Skip to content

Instantly share code, notes, and snippets.

@brianr
Created October 30, 2013 07:49
Show Gist options
  • Save brianr/7228654 to your computer and use it in GitHub Desktop.
Save brianr/7228654 to your computer and use it in GitHub Desktop.
function runTest() {
console.log("making ajax call");
$.ajax({
url: "/failing"
}).fail(function(result) {
console.log("in fail");
console.log("_rollbar:", _rollbar);
return _rollbar.push('TEST', function() {
console.log("in callback");
return alert('TEST');
});
});
}
// this works
setTimeout(runTest, 1000);
// this does not
runTest();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment