What causes: Error "Cannot read property 'code' of undefined” when tweeting with attached video



I posted this tweet in 2017 but still get replies to it a few times a month from users with same issue. What does the error mean, what causes it?

Tweet: https://twitter.com/MattNavarra/status/839180129469358080

Twitter is having issues:
Users can’t post tweets with images or video - Error "Cannot read property 'code' of undefined” #twitterdown

— 𝗠𝗮𝘁𝘁 𝗡𝗮𝘃𝗮𝗿𝗿𝗮 (@MattNavarra) March 7, 2017


Hey Matt, sorry you continue to have folks reply to your Tweet about this! Suspect they are searching for the same error message they are seeing and then +1’ing your Tweet.

I think this is / was a temporary issue related to Javascript not loading in the Twitter.com web page, for some reason - could be a network issue. Unfortunately not something we are able to answer on the developer (API) forums, as this doesn’t relate to video uploaded via the developer platform. I’d refer folks to @TwitterSupport in the meantime.