mirror of
https://github.com/KevinMidboe/moviedb.git
synced 2025-10-29 09:40:24 +00:00
Throw error on bad apikey request.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user