After_failure not triggering

Hey there, we have a build failure over here but the after_failure part is not executed. Any idea why?

I believe that nonzero exits before script (in this case, before_script):

is considered a failure, but, rather, an error, as indicated in the status.

Hrm would moving to script and after_script help then?

Or I guess the better way would be to move my before_script to script and my script to after_sucess, otherwise it would always run since after_script still runs even if the job failed