Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Web Services
-
Labels:None
-
Number of attachments :
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() {