1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00

chore: log unerlying DB error in set user root role (#5324)

This commit is contained in:
Mateusz Kwasniewski 2023-11-13 12:16:01 +01:00 committed by GitHub
parent 5782efa6c0
commit ce7644e0af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -347,9 +347,9 @@ export class AccessService {
DEFAULT_PROJECT,
);
} catch (error) {
throw new Error(
`Could not add role=${newRootRole.name} to userId=${userId}`,
);
const message = `Could not add role=${newRootRole.name} to userId=${userId}`;
this.logger.error(message, error);
throw new Error(message);
}
} else {
throw new BadDataError(`Could not find rootRole=${role}`);