Creating a tag with an invalid ref name on a commit fails silently without displaying an error message in the UI

XMLWordPrintable

    • 1
    • Severity 3 - Minor
    • 3

      Issue Summary

      When attempting to create a tag on a commit via the Bitbucket Data Center Web UI using an invalid Git ref name (for example, a name containing a leading/trailing space or invalid ref characters), the creation request fails silently.

      The backend API correctly returns an HTTP 400 Bad Request with an InvalidRefNameException, but the UI does not capture or surface the error message in the dialog. As a result, the modal remains open with no feedback, leaving users unaware of the failure or assuming the page has frozen.

      Steps to Reproduce

      1. Navigate to a repository in Bitbucket Data Center.
      2. Go to Commits and select a commit.
      3. Open the Create tag dialog.
      4. In the tag name field, enter a name containing invalid characters or leading/trailing whitespace (e.g., " moon_17.31.5").
      5. Click Create tag (or submit the form).

      Expected Results

      The UI handles the HTTP 400 response and displays an inline validation error or alert flag explaining why the tag name was rejected (e.g., "Ref name ' moon_17.31.5' may not contain spaces").

      Actual Results

      • The UI displays no error message, flag, or validation banner.
      • The modal remains open without indicating that the request failed.
      • The error is only visible in the browser developer tools (Network inspection tab) with an HTTP 400 response:
      {
          "errors": [
              {
                  "message": "Ref name ' moon_17.31.5' may not contain spaces",
                  "exceptionName": "com.atlassian.bitbucket.repository.InvalidRefNameException",
                  "refName": " moon_17.31.5"
              }
          ]
      }
      

      Workaround

      Ensure tag names strictly conform to Git reference naming conventions without leading/trailing whitespace or spaces prior to submitting the dialog in the UI.

              Assignee:
              Navpreet Ahuja
              Reporter:
              AP
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: