diff --git a/lib/controllers/media.js b/lib/controllers/media.js index 5cf6c1e..bf7aaf0 100644 --- a/lib/controllers/media.js +++ b/lib/controllers/media.js @@ -90,6 +90,7 @@ MediaController.prototype.sessionRequest = function(data, callback) { this.request(data, function(err, response) { if(err) return callback(err); + if(typeof(response.status) == 'undefined') return callback(response.reason || 'unknown response'); var status = response.status[0]; callback(null, status); });