How to fail step on error in child step

We are using multiple child steps for running multiple custom scripts after we deployed nuget package.
It looks something like this:

Deploy site1
|---- take site offline in load balanser
|---- deploy nuget package
|---- do custom logic
|---- do custom logic

At this moment if there is an error running custom script octopus still proceeds with custom logic and there is no way to specify that a child step should run only in case previous child step succeeded.
I’d like not to run anything on the current deployment target machine in case there were errors in any child steps.
Is there any way to achieve this?

Kind Regards,

Hi Evgeny,

Thanks for getting in touch! Have you considered running your custom logic script from one of our predefined package scripts?
That way it won’t run unless all the previous steps in the package step have executed.

Let me know what you think,