diff --git a/src/apps/dashboard/routes/users/add.tsx b/src/apps/dashboard/routes/users/add.tsx index 98cc928887..be7a25f6c1 100644 --- a/src/apps/dashboard/routes/users/add.tsx +++ b/src/apps/dashboard/routes/users/add.tsx @@ -148,9 +148,17 @@ const UserNew = () => { }).catch(err => { console.error('[usernew] failed to update user policy', err); }); - }, function () { - toast(globalize.translate('ErrorDefault')); - loading.hide(); + }, 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')); + loading.hide(); + } }); };