Skip to content

Commit 7501ae7

Browse files
committed
Preserve error context in logService
1 parent 3003a7c commit 7501ae7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/services/directory-services/gsuite-directory.service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,11 @@ export class GSuiteDirectoryService extends BaseDirectoryService implements IDir
255255

256256
try {
257257
await this.client.authorize();
258-
} catch {
258+
} catch (error) {
259259
// Catch and rethrow this to sanitize any sensitive info (e.g. private key) in the error message
260-
this.logService.error("Google Workspace authentication failed");
260+
this.logService.error(
261+
`Google Workspace authentication failed: ${error?.name || "Unknown error"}`,
262+
);
261263
throw new Error(this.i18nService.t("authenticationFailed"));
262264
}
263265

0 commit comments

Comments
 (0)