From ce7644e0af884f80887a179ccdc769d924c2d930 Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Mon, 13 Nov 2023 12:16:01 +0100 Subject: [PATCH] chore: log unerlying DB error in set user root role (#5324) --- src/lib/services/access-service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/services/access-service.ts b/src/lib/services/access-service.ts index f7e55a4a5a78..399d37f5e747 100644 --- a/src/lib/services/access-service.ts +++ b/src/lib/services/access-service.ts @@ -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}`);