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

Trying to update description of a built-in rule is failing with an error 500 instead of 400

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0
    • Component/s: Rules, Web API
    • Labels:

      Description

      Using ws api/rules/update on a non custom rule and trying to update Markdown description a 500 error is generated with following stack trace :

      2017.12.01 14:55:49 ERROR web[AWASTwa+pAgeBy97AABB][o.s.s.w.WebServiceEngine] Fail to process request http://127.0.0.1:33657/api/rules/update
      java.lang.IllegalStateException: Not a custom rule
      	at org.sonar.server.rule.RuleUpdate.checkCustomRule(RuleUpdate.java:227)
      	at org.sonar.server.rule.RuleUpdate.setMarkdownDescription(RuleUpdate.java:126)
      	at org.sonar.server.rule.ws.UpdateAction.readRequest(UpdateAction.java:215)
      	at org.sonar.server.rule.ws.UpdateAction.handle(UpdateAction.java:186)
      	at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
      

        Attachments

          Activity

            People

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

              Dates

              Due:
              Created:
              Updated:
              Resolved: