title: react-query useMutation onError never firing
body: <p>I'm currently trying out react-query in my project.</p>
  <p>I'm having trouble with handling errors within my mutation.</p>
  <p>In my networks tab, I can confirm that the server is responding with code 400 or 500, which I assumed makes axios throw an error, thus firing the defined onError function.</p>
  <p>However, the onSuccess function is always called no matter how the API call goes.</p>
  <p>What am I missing here? Thanks in advance.</p>
  <pre><code>const { mutate } = useMutation(
  ['mutation'],
  () =&gt; axios.patch(API_URL, params),
  {
    onSuccess: () =&gt; {
      //this is always fired, even when response code is 400, 500, etc.
      void queryClient.invalidateQueries('query');
    },
    onError: () =&gt; {
      //should do something but never fired
    },
  }
  </code></pre>
  <p>);</p>