JavaScript createTimeline factory function not returning error message


#1

I am using Twitter Timeline factory function to create twitter widget. I have used below code,

twttr.widgets.createTimeline({
sourceType: ‘profile’,
screenName: ‘twitterdev’
},
document.getElementById(‘container’)
).then(function(el) {
console.log(el);
}, function(status) {
console.log(status);
});

In the Promise section if the widget is successfully created, I am receiving el element but if it throws exception that was not captured in status block. This code is works fine before but now its not working properly.

My requirement is if widget is not created I need to capture the exact error message.


#2

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.