Skip to content

fix: Detailed error message after failed commit

Paul Slaughter requested to merge ps-fix-detailed-error-message-in-commit into main

Issue: [Regression] Generic error message after failed... (#329 - closed)

Description

  • After these changes we inadvertently broke the error message presentation because we expected the message to be a JSON object of status, body

Screenshots

Before After
Screenshot_2024-04-11_at_4.24.46_PM Screenshot_2024-04-11_at_4.20.55_PM

How to test?

  1. Start the Web IDE Example App locally yarn start:example.
  2. Connect the Web IDE Example App either to local GDK or gitlab.com with Auth set.
  3. Make a change and go to the Source Control tab and click the dropdown next to commit and select Commit to new branch
  4. Enter the name of an existing branch (not the one you're currently on) which should cause the commit to fail.
  5. You should see a helpful error message like You're not allowed to push to this branch, not a generic one.

Also, checkout this part of the Web IDE where we handle all of these error cases (can give you an idea of whether or not this is working and how to force a failure on commit):

Edited by Paul Slaughter

Merge request reports