Unable to get more info in failure callback using Javascript


#1

Hi,

I have used following code to customize twitter widget. I need to display a reasonable failure message to end user. The below code returns only error response code.

twttr.widgets.createTimeline(
‘123456’,
document.getElementById(‘timeline’),
{
width: ‘450’,
height: ‘700’,
related: ‘twitterdev,twitterapi’
}).then(function (el) {
console.log(“Success.”)
}, function (status) {
console.log(status);
});
);

Console response:


#2

We do have a desire to overhaul how we return errors for cases like this, but haven’t had much time for it as yet. There would be translation issues to overcome, too. For the time being, you can map the error codes to friendly messages where available (404 is indeed for cases where a timeline ID does not exist.)

Ben


#3