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 Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • 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

        Hide
        Simon Brandhof added a comment -

        WS java client is not maintained anymore

        Show
        Simon Brandhof added a comment - WS java client is not maintained anymore

          People

          • Assignee:
            Unassigned
            Reporter:
            Simon Brandhof

            Dates

            • Created:
              Updated:
              Resolved: