1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Pass api error message through to toast notification when creating new user

This commit is contained in:
SHestres 2024-12-17 07:21:49 +00:00
parent 9d7532ceab
commit 9138734520

View file

@ -148,9 +148,17 @@ const UserNew = () => {
}).catch(err => { }).catch(err => {
console.error('[usernew] failed to update user policy', err); console.error('[usernew] failed to update user policy', err);
}); });
}, function () { }, function (error) {
try {
console.error('[usernew] failed to create new user', error);
error.text().then((errorMessage: string) => {
toast(errorMessage);
loading.hide();
});
} catch {
toast(globalize.translate('ErrorDefault')); toast(globalize.translate('ErrorDefault'));
loading.hide(); loading.hide();
}
}); });
}; };