Throw error on bad apikey request.

This commit is contained in:
Dan Zajdband
2014-10-15 20:16:10 -03:00
parent cfdb406cd3
commit 2e093aa080

View File

@@ -40,8 +40,8 @@ MovieDB.prototype.requestToken = function(fn){
if(res.ok) self.token = res.body;
else throw res.error;
fn();
}).on('error', function(){
throw res.error;
}).on('error', function(error){
throw error;
});
return this;