Skip to content

Commit 2a03838

Browse files
committed
Check again for info
1 parent f1bc586 commit 2a03838

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/RestWrite.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,8 +1562,12 @@ RestWrite.prototype.runDatabaseOperation = function () {
15621562
Parse.Error.USERNAME_TAKEN,
15631563
'Account already exists for this username.'
15641564
);
1565-
if (this.config.logLevels.usernameAlreadyExists !== 'silent') {
1566-
logger[this.config.logLevels.usernameAlreadyExists](JSON.stringify(usernameError));
1565+
if (this.config.logLevels.usernameAlreadyExists === 'info') {
1566+
logger.info(JSON.stringify(usernameError));
1567+
} else if (this.config.logLevels.usernameAlreadyExists === 'warn') {
1568+
logger.warn(JSON.stringify(usernameError));
1569+
} else if (this.config.logLevels.usernameAlreadyExists === 'error') {
1570+
logger.error(JSON.stringify(usernameError));
15671571
}
15681572
throw usernameError;
15691573
}

0 commit comments

Comments
 (0)