richer errors in the msgraph import steps

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-11-10 11:56:29 +01:00
parent 37524f5885
commit 0e37858f22
2 changed files with 8 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-msgraph': patch
---
Added cause information to logged warnings
@@ -122,7 +122,7 @@ export async function readMicrosoftGraphUsers(
120,
);
} catch (e) {
options.logger.warn(`Unable to load photo for ${user.id}`);
options.logger.warn(`Unable to load photo for ${user.id}, ${e}`);
}
const entity = await transformer(user, userPhoto);
@@ -206,7 +206,7 @@ export async function readMicrosoftGraphUsersInGroups(
expand: options.userExpand,
});
} catch (e) {
options.logger.warn(`Unable to load user for ${userId}`);
options.logger.warn(`Unable to load user for ${userId}, ${e}`);
}
if (user) {
try {
@@ -217,7 +217,7 @@ export async function readMicrosoftGraphUsersInGroups(
120,
);
} catch (e) {
options.logger.warn(`Unable to load userphoto for ${userId}`);
options.logger.warn(`Unable to load userphoto for ${userId}, ${e}`);
}
const entity = await transformer(user, userPhoto);