* Fix #6179 Initializing default logger Fixes: #6179 Removes unnessary logs * fix typo * if error just write to console
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// Helper functions for accessing the twitter API.
|
||||
var OAuth = require('./OAuth1Client');
|
||||
var Parse = require('parse/node').Parse;
|
||||
var logger = require('../../logger').default;
|
||||
|
||||
// Returns a promise that fulfills iff this user id is valid.
|
||||
function validateAuthData(authData, options) {
|
||||
@@ -37,10 +36,6 @@ function handleMultipleConfigurations(authData, options) {
|
||||
if (Array.isArray(options)) {
|
||||
const consumer_key = authData.consumer_key;
|
||||
if (!consumer_key) {
|
||||
logger.error(
|
||||
'Twitter Auth',
|
||||
'Multiple twitter configurations are available, by no consumer_key was sent by the client.'
|
||||
);
|
||||
throw new Parse.Error(
|
||||
Parse.Error.OBJECT_NOT_FOUND,
|
||||
'Twitter auth is invalid for this user.'
|
||||
@@ -51,10 +46,6 @@ function handleMultipleConfigurations(authData, options) {
|
||||
});
|
||||
|
||||
if (options.length == 0) {
|
||||
logger.error(
|
||||
'Twitter Auth',
|
||||
'Cannot find a configuration for the provided consumer_key'
|
||||
);
|
||||
throw new Parse.Error(
|
||||
Parse.Error.OBJECT_NOT_FOUND,
|
||||
'Twitter auth is invalid for this user.'
|
||||
|
||||
Reference in New Issue
Block a user