SonarQube
  1. SonarQube
  2. SONAR-2780

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

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Web Services
    • Labels:
      None
    • Number of attachments :
      0

      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

        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 ]

          People

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

            Dates

            • Created:
              Updated: