Mark Job as failed/warning

is there a possibilty to mark jobs as failed or finished with warnings ?
Currently , as long as the Script finishes, the job state is success and it is not possible to see if a certain job had some issues.

Product: PowerShell Universal
Version: 2.8.2

You can set the error action on the Script properties to Stop to have the job marked as failed when this happens.