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

        No changes have yet been made on this issue.

          People

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

            Dates

            • Created:
              Updated: