Failing to edit a comment in the changes tab, updates the comment in the doscussions tab

Summary

When the API returns an error the comment gets updated in the discussions tab.

Steps to reproduce

  1. Go to a MR
  2. Click on the Changes tab
  3. Click the the edit button to edit a comment
  4. Edit the comment
  5. Toggle the offline feature in the inspector panel
  6. Click save comment
  7. Click on the Discussion tab
  8. See the updated comment

Preview

What is the expected correct behaviour?

The comment should not be updated in the Discussion tab.