Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-10653

api/qualityprofiles/restore fails with error 500 when file contains invalid data

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2
    • Component/s: Quality Profile, Web API
    • Labels:
      None

      Description

      Here's the stacktrace generated when the file contains invalid data:

      2018.04.25 14:19:15 ERROR web[AWL3OF1hGDAfY81IA0ck][o.s.s.w.WebServiceEngine] Fail to process request http://sonarcloud.io/api/qualityprofiles/restore
      java.lang.IllegalStateException: Fail to restore Quality profile backup
              at org.sonar.server.qualityprofile.QProfileBackuperImpl.restore(QProfileBackuperImpl.java:174)
              at org.sonar.server.qualityprofile.QProfileBackuperImpl.restore(QProfileBackuperImpl.java:124)
      ....
      Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <profile>
       at [row,col {unknown-source}]: [324,0]
              at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:685)
      ....
      

      The WS should not generate an error 500 but an error 400, without any stacktrace on server side.

        Attachments

          Activity

            People

            • Assignee:
              guillaume.jambet Guillaume Jambet (Inactive)
              Reporter:
              julien.lancelot Julien Lancelot
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: