Shotgun Event Plugin - how to trigger "Failed" status

How does a job opt-in to the Shotgun Event plugin such that a failure (either triggered by max fails, or by the user) is reported to the corresponding status in Shotgun?

We currently have it working such that the “Started Status” and “Finished Status” updates work, but in my testing I haven’t been able to trigger the “Failed Status”.

Are you looking for RepositoryUtils.FailJob(job) perhaps?

Thanks mois - I went ahead and took ownership of the shotgun event python code and figured it all out.