Added exception for Twitter and OAuth missing options (#3676)
* Added exception for Twitter and OAuth missing configuration information * Updated error codes to INTERNAL_SERVER_ERROR, code 1
This commit is contained in:
committed by
Florent Vilmart
parent
a54f4d43fa
commit
e01b417d3f
@@ -5,6 +5,9 @@ var logger = require('../../logger').default;
|
||||
|
||||
// Returns a promise that fulfills iff this user id is valid.
|
||||
function validateAuthData(authData, options) {
|
||||
if(!options) {
|
||||
throw new Parse.Error(Parse.Error.INTERNAL_SERVER_ERROR, 'Twitter auth configuration missing');
|
||||
}
|
||||
options = handleMultipleConfigurations(authData, options);
|
||||
var client = new OAuth(options);
|
||||
client.host = "api.twitter.com";
|
||||
|
||||
Reference in New Issue
Block a user