buildstatus won't be defined if e.g. a build is queued but none have failed.
CWZEJRHAQUXT7S4XMC5X7M2VGIRTSFEXCP7WVI63T6QF2L3V76TQC
NYIIFA32IHFJIHC5IEAJKOCHXQ7QNR4SN3DDUUPM2GYL3SZNWFDAC
if ($build->buildstatus != 0) {
if (defined $build->buildstatus && $build->buildstatus != 0) {