Could you explain the reason behind adding this code?

If we were to keep this, I think we would need to be a bit more precise, i.e. is the authorization pending/required/invalid/etc.?