Correct handling of oauth errors