Skip to content

Commit

Permalink
#21
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Jul 29, 2020
1 parent e0e5cb8 commit 759badc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Public/Send-TeamsMessage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ function Send-TeamsMessage {
}
}
if ($Execute -like '*failed*' -or $Execute -like '*error*') {
Write-Warning "Send-TeamsMessage - Couldn't send message. Execute message: $Execute"
if ($ShowErrors) {
Write-Error "Send-TeamsMessage - Couldn't send message. Execute message: $Execute"
} else {
Write-Warning "Send-TeamsMessage - Couldn't send message. Execute message: $Execute"
}
}
Write-Verbose "Send-TeamsMessage - Execute $Execute Body $Body"
if (-not $Suppress) { return $Body }
Expand Down

0 comments on commit 759badc

Please sign in to comment.