Skip to content

Commit

Permalink
fix: no error on employee not found (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
mspreeuwenberg authored Dec 23, 2024
1 parent d5809ee commit 0d1e899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion delete.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ try {

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

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

0 comments on commit 0d1e899

Please sign in to comment.