Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,9 @@ describe('syncVisitToOneIdentityHandler', () => {

await expect(
syncVisitToOneIdentityHandler(visitMessage, Event.VISIT_DELETED)
).rejects.toThrow('Person not found in One Identity');
).rejects.toThrow(
'Person with central account "visitor-oidc-sub" not found in One Identity'
);

expect(mockOneIdentity.login).toHaveBeenCalled();
expect(mockOneIdentity.getPerson).toHaveBeenCalledWith(
Expand Down Expand Up @@ -998,7 +1000,9 @@ describe('syncVisitToOneIdentityHandler', () => {

await expect(
syncVisitToOneIdentityHandler(visitMessage, Event.VISIT_UPDATED)
).rejects.toThrow('Person not found in One Identity');
).rejects.toThrow(
'Person with central account "visitor-oidc-sub" not found in One Identity'
);

expect(mockOneIdentity.login).toHaveBeenCalled();
expect(mockOneIdentity.getPerson).toHaveBeenCalledWith(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ async function getScienceUser(
const person = await oneIdentity.getPerson(centralAccount);

if (!person) {
throw new Error('Person not found in One Identity');
throw new Error(
`Person with central account "${centralAccount}" not found in One Identity`
);
}

if (person.CCC_EmployeeSubType === IdentityType.ESSSCIENCEUSER)
Expand Down
Loading