Added retry limit

The bot will no longer get stuck on errors it should not handle.