fix(login) hide password in console EE-5279 (#8774)

pull/6987/merge
cmeng 2023-04-29 07:24:33 +12:00 committed by GitHub
parent ae339a0047
commit 0f9a0e25f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -47,8 +47,10 @@ export function notifyError(title: string, e?: Error, fallbackText = '') {
const msg = pickErrorMsg(e) || fallbackText;
saveNotification(title, msg, 'error');
// eslint-disable-next-line no-console
console.error(e);
if (!_.get(e, 'resource.password')) {
// eslint-disable-next-line no-console
console.error(e);
}
if (msg !== 'Invalid JWT token') {
toastr.error(sanitize(_.escape(msg)), sanitize(title), { timeOut: 6000 });