File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments