thrownewMeteor.Error('error-input-is-not-a-valid-field',`${soundData.name} is not a valid name`,{method:'insertOrUpdateSound',input:soundData.name,field:'Name'});
thrownewMeteor.Error('error-input-is-not-a-valid-field',`${soundData.name} is not a valid name`,{method:'insertOrUpdateSound',input:soundData.name,field:'Name'});
thrownewMeteor.Error('error-input-is-not-a-valid-field',`${emojiData.name} is not a valid name`,{method:'insertOrUpdateEmoji',input:emojiData.name,field:'Name'});
thrownewMeteor.Error('error-input-is-not-a-valid-field',`${emojiData.name} is not a valid name`,{method:'insertOrUpdateEmoji',input:emojiData.name,field:'Name'});
}
if(emojiData.aliases){
if(aliasValidation.test(emojiData.aliases)){
thrownewMeteor.Error('error-input-is-not-a-valid-field',`${emojiData.aliases} is not a valid alias set`,{method:'insertOrUpdateEmoji',input:emojiData.aliases,field:'Alias_Set'});
thrownewMeteor.Error('error-input-is-not-a-valid-field',`${emojiData.aliases} is not a valid alias set`,{method:'insertOrUpdateEmoji',input:emojiData.aliases,field:'Alias_Set'});
thrownewMeteor.Error('error-importer-not-defined',`The importer, "${name}", was not defined correctly, it is missing the Import class.`,{method:'prepareImport'});
thrownewMeteor.Error('error-importer-not-defined',`The importer, "${name}", was not defined correctly, it is missing the Import class.`,{method:'prepareImport'});
logger.outgoing.error(`Error running Script in the Integration ${integration.name}:`);
logger.outgoing.debug(integration.scriptCompiled.replace(/^/gm,' '));// Only output the compiled script if debugging is enabled, so the logs don't get spammed.
thrownewMeteor.Error('LDAP-login-error','LDAP Authentication succeded, but there\'s already an existing user with provided username ['+username+'] in Mongo.');
thrownewMeteor.Error('LDAP-login-error',`LDAP Authentication succeded, but there's already an existing user with provided username [${username}] in Mongo.`);
consterror=newMeteor.Error('LDAP-login-error','LDAP Authentication succeded, there is no email to create an account. Have you tried setting your Default Domain in LDAP Settings?');
thrownewMeteor.Error('error-archived-duplicate-name','There\'s an archived channel with name '+name,{function:'RocketChat.createRoom',room_name:name});
thrownewMeteor.Error('error-archived-duplicate-name',`There's an archived channel with name ${name}`,{function:'RocketChat.createRoom',room_name:name});
}else{
thrownewMeteor.Error('error-duplicate-channel-name','A channel with name \''+name+'\' exists',{function:'RocketChat.createRoom',room_name:name});
thrownewMeteor.Error('error-duplicate-channel-name',`A channel with name '${name}' exists`,{function:'RocketChat.createRoom',room_name:name});
thrownewMeteor.Error('error-input-is-not-a-valid-field',`${_.escape(userData.username)} is not a valid username`,{method:'insertOrUpdateUser',input:userData.username,field:'Username'});
thrownewMeteor.Error('error-input-is-not-a-valid-field',`${_.escape(userData.username)} is not a valid username`,{method:'insertOrUpdateUser',input:userData.username,field:'Username'});
thrownewMeteor.Error('error-field-unavailable',`${_.escape(userData.username)} is already in use :(`,{method:'insertOrUpdateUser',field:userData.username});
thrownewMeteor.Error('error-field-unavailable',`${_.escape(userData.username)} is already in use :(`,{method:'insertOrUpdateUser',field:userData.username});
console.log(`Error while handling the setting of the avatar from a url (${dataURI}) for ${user.username}:`,error);
thrownewMeteor.Error('error-avatar-url-handling',`Error while handling avatar setting from a URL (${dataURI}) for ${user.username}`,{function:'RocketChat.setUserAvatar',url:dataURI,username:user.username});
console.log(`Error while handling the setting of the avatar from a url (${dataURI}) for ${user.username}:`,error);
thrownewMeteor.Error('error-avatar-url-handling',`Error while handling avatar setting from a URL (${dataURI}) for ${user.username}`,{function:'RocketChat.setUserAvatar',url:dataURI,username:user.username});
}
}
if(result.statusCode!==200){
console.log(`Not a valid response, ${result.statusCode}, from the avatar url: ${dataURI}`);