mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-19 22:25:51 +02:00
fix: show proper error if server down in self-hosting
This commit is contained in:
@@ -51,7 +51,10 @@ export default async function UpdateExistUserAsAdmin(request) {
|
||||
extClsQuery.notEqualTo('IsDisabled', true);
|
||||
const extAdminRes = await extClsQuery.find({ useMasterKey: true });
|
||||
if (extAdminRes && extAdminRes.length === 1 && extAdminRes?.[0]?.get('OrganizationId')) {
|
||||
throw new Parse.Error(Parse.Error.DUPLICATE_VALUE, 'Admin already exist.');
|
||||
throw new Parse.Error(
|
||||
Parse.Error.DUPLICATE_VALUE,
|
||||
'Admin already exists. Please login to the application using admin credentials in order to manage users.'
|
||||
);
|
||||
} else {
|
||||
const extCls = new Parse.Query('contracts_Users');
|
||||
extCls.equalTo('Email', email);
|
||||
|
||||
Reference in New Issue
Block a user