Failed matrix stage returns a null status

Problem Statement:

During a Matrix CI stage execution, a customer may see a null status returned with pipeline failure

Screen Shot 2023-04-28 at 12.46.57 PM

Explanation/ Solution:

This is caused by the variable being referenced outside the Matrix step.

In the above explanation, the variable is <+pipeline.stages.Test_Package_0.status>