Final state in filter

When a job fails, the OnStateElection filter (IElectStateFilter) is triggered, but pending removal (AttemptsExceededAction.Delete) after repeated failures it’s IsFinal property is always false, so how can I check the final state (last attempt failed) in a filter? Even OnPerformed filter doesn’t include this info.

Never mind, found that the ‘deleted’ state is triggered.