aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/helpers
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2022-05-25 14:46:39 +0200
committersonartech <sonartech@sonarsource.com>2022-05-25 20:03:17 +0000
commit1288849ced136e798f9a315daf0c75b209786a20 (patch)
treef87cf9c00b048c4db2f22e8dfa4bd22abc253dfe /server/sonar-web/src/main/js/helpers
parenta3e8edb751045393fa65d530439721d150f7630c (diff)
downloadsonarqube-1288849ced136e798f9a315daf0c75b209786a20.tar.gz
sonarqube-1288849ced136e798f9a315daf0c75b209786a20.zip
SONAR-14648 Handle 'Open in IDE' errors
Diffstat (limited to 'server/sonar-web/src/main/js/helpers')
-rw-r--r--server/sonar-web/src/main/js/helpers/sonarlint.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/helpers/sonarlint.ts b/server/sonar-web/src/main/js/helpers/sonarlint.ts
index 3ed89ca75e0..3e48575a5cb 100644
--- a/server/sonar-web/src/main/js/helpers/sonarlint.ts
+++ b/server/sonar-web/src/main/js/helpers/sonarlint.ts
@@ -19,6 +19,7 @@
*/
import { getHostUrl } from '../helpers/urls';
import { Ide } from '../types/sonarlint';
+import { checkStatus } from './request';
const SONARLINT_PORT_START = 64120;
const SONARLINT_PORT_RANGE = 11;
@@ -43,7 +44,7 @@ export function openHotspot(calledPort: number, projectKey: string, hotspotKey:
showUrl.searchParams.set('server', getHostUrl());
showUrl.searchParams.set('project', projectKey);
showUrl.searchParams.set('hotspot', hotspotKey);
- return fetch(showUrl.toString());
+ return fetch(showUrl.toString()).then((response: Response) => checkStatus(response, true));
}
/**