Skip to content

Commit 0d1e899

Browse files
fix: no error on employee not found (#17)
1 parent d5809ee commit 0d1e899

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

delete.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ try {
203203

204204
Write-Verbose "Error at Line [$($ex.InvocationInfo.ScriptLineNumber)]: $($ex.InvocationInfo.Line). Error: $($errorMessage.VerboseErrorMessage)"
205205

206-
if ($errorMessage.AuditErrorMessage -Like "No AFAS employee found AFAS employee where [$($correlationProperty)] = [$($correlationValue)]") {
206+
if ($errorMessage.AuditErrorMessage -Like "No AFAS employee found AFAS employee*") {
207207
$outputContext.AuditLogs.Add([PSCustomObject]@{
208208
Action = "DeleteAccount"
209209
Message = "No AFAS employee found AFAS employee where [$($correlationProperty)] = [$($correlationValue)]. Possibly deleted."

0 commit comments

Comments
 (0)