Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-11645

Invalid json is returned when Git LFS requests return error messages

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 6.2.0, 6.0.4, 6.1.3
    • 5.13.0
    • Git LFS
    • None

    Description

      Issue Summary

      In cases where Git LFS requests lead to an error, the message contains "\n" characters, which are invalid in the json response (and can cause the client not to show the message)
       

      Steps to Reproduce

      For an authentication error, as an example, the server returns the following json response:

      {"message":"Not authenticated
      
      Please authenticate and try your request again."}
      

      Note that after "Not authenticated" the message contains two "\n" characters.

       

      The git lfs command-line client is unable to parse the message, and instead shows the following:

      batch response: Authentication required: Unable to parse HTTP response for POST <URL>: invalid character '\n' in string literal
      

      Workaround

      A workaround, to see the actual error message, is to enable git debug logging (eg GIT_TRACE=1)

      Attachments

        Activity

          People

            fdoherty@atlassian.com Frank Doherty
            fdoherty@atlassian.com Frank Doherty
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: