title: How to retry failed Vue Concurrency tasks?
body: <p>I am using <a href="https://vue-concurrency.netlify.app/" rel="nofollow noreferrer">Vue Concurrency</a> in my Vue 3 / TypeScript project.</p>
  <p>And I want to create a Task that will retry <code>x</code> number of times if a specific kind of error is thrown.</p>
  <p>But I can't figure out how to retry the call based on it's error message. I want to retry the call a limited number of times if the error is <code>INVALID_OAUTH</code>. Otherwise just throw the error like normal.</p>
  <p>How can this be done?</p>
  <p>For example:</p>
  <pre><code>const getZohoDeskTicketByIdTask = useTask(function* (signal, ticketId: string) {
    const ticket: string = yield getZohoDeskTicketById({
      ticketId: ticketId,
    });
    // If the above yield returns an error of 'INVALID_OAUTH' it should retry X number of times before failing. If the error is anything else, throw it like normal.
    return ticket;
  });
  
  const ticket = await getZohoDeskTicketByIdTask.perform('12345');
  </code></pre>