You can always use the old try / catch to make sure your assembly does not work in this step:
def resultBefore = currentBuild.result try { slackSend color: 'danger', message: 'Everything broke' } catch(err) { currentBuild.result = resultBefore }
However, I really do not understand why the slackSend command slackSend not exist? It may fail (for example, if your Slack server is turned off), but as long as you installed Slack Notification Plugin , it must exist!
Pom12 source share