Fixes #4997 stop requesting a token after a failed request