aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main
diff options
context:
space:
mode:
authorEric Giffon <eric.giffon@sonarsource.com>2023-02-07 15:17:32 +0100
committersonartech <sonartech@sonarsource.com>2023-02-08 20:03:37 +0000
commit04b407fcbb9835a1228eb130c3edce5e61341510 (patch)
tree78196b40e6e6bb3754c6c9ebe92cbef31439d96b /sonar-scanner-engine/src/main
parent8de5e9f1d721daa75ba0e09512f3a0014bd48fb4 (diff)
downloadsonarqube-04b407fcbb9835a1228eb130c3edce5e61341510.tar.gz
sonarqube-04b407fcbb9835a1228eb130c3edce5e61341510.zip
SONAR-18242 Clarify error message when creating new project without permissions during scan
Diffstat (limited to 'sonar-scanner-engine/src/main')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java
index 3c5b422c77e..a53e81dc407 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java
@@ -113,7 +113,8 @@ public class DefaultScannerWsClient implements ScannerWsClient {
+ "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());