add MaxAttempts limit to prevent infinite failed requests