chore: set as undefined if there's an error in the grabbing of the user entity

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-08-15 11:41:47 +02:00
parent 8675682e5f
commit 381ff8164f
@@ -192,7 +192,12 @@ export async function createRouter(
);
const userEntity = userEntityRef
? await catalogClient.getEntityByRef(userEntityRef, { token })
? await catalogClient
.getEntityByRef(userEntityRef, { token })
.catch(e => {
logger.error(`Failed to get user entity: ${stringifyError(e)}`);
return undefined;
})
: undefined;
let auditLog = `Scaffolding task for ${templateRef}`;