+ "Please provide a user token in %s or other credentials in %s and %s.", CoreProperties.LOGIN, CoreProperties.LOGIN, CoreProperties.PASSWORD));
}
if (code == HTTP_FORBIDDEN) {
- throw MessageException.of("You're not authorized to run analysis. Please contact the project administrator.");
+ throw MessageException.of("You're not authorized to analyze this project or the project doesn't exist on SonarQube" +
+ " and you're not authorized to create it. Please contact an administrator.");
}
if (code == HTTP_BAD_REQUEST) {
String jsonMsg = tryParseAsJsonError(response.content());
assertThatThrownBy(() -> new DefaultScannerWsClient(wsClient, true,
new GlobalAnalysisMode(new ScannerProperties(Collections.emptyMap())), analysisWarnings).call(request))
.isInstanceOf(MessageException.class)
- .hasMessage("You're not authorized to run analysis. Please contact the project administrator.");
+ .hasMessage("You're not authorized to analyze this project or the project doesn't exist on SonarQube and you're not authorized to create it. Please contact an administrator.");
}
@Test