SonarQube
  1. SonarQube
  2. SONAR-2780

The HTTP response status should be available in the Java Web Service client

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Web Services
    • Labels:
      None

      Description

      The exception org.sonar.wsclient.connectors.ConnectionException is raised when the status is different than 200. The pb is that this exception does not keep the status (except in the message). An alternative is to use dedicated exceptions like UnauthorizedException and BadRequestException. It would make junit tests simpler :

      @Test(expected=UnauthorizedException.class)
      public void shouldFailIfNoRole() {
      

        Activity

        Simon Brandhof created issue -
        OLD - Fabrice Bellingard made changes -
        Field Original Value New Value
        Fix Version/s TO_REVIEW_SIMON [ 20414 ]
        Simon Brandhof made changes -
        Fix Version/s TO_REVIEW_SIMON [ 20414 ]
        Simon Brandhof made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Henri Gomez made changes -
        Project Import Wed May 27 13:41:49 CEST 2015 [ 1432726909095 ]
        Henri Gomez made changes -
        Project Import Thu May 28 19:38:02 UTC 2015 [ 1432841882590 ]
        Freddy Mallet made changes -
        Workflow jira [ 29936 ] Default SonarSource Workflow [ 55167 ]
        Freddy Mallet made changes -
        Workflow Default SonarSource Workflow [ 55167 ] Default Agile SonarSource Workflow [ 75391 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Simon Brandhof
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: