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.