Differentiating between session failures and command failures