diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-02-22 12:08:16 +0100 |
---|---|---|
committer | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-02-23 16:34:13 +0100 |
commit | 5b3eaeebc6e69dc03d794cc0febcacb48408cf10 (patch) | |
tree | 05912182ccdf41d7c1d2ddf738c106988db52849 /server/sonar-web/src/main/js/api/issues.ts | |
parent | 1ecbb0ef85da06d61cfda9f19568f3311f795d8e (diff) | |
download | sonarqube-5b3eaeebc6e69dc03d794cc0febcacb48408cf10.tar.gz sonarqube-5b3eaeebc6e69dc03d794cc0febcacb48408cf10.zip |
SONAR-10207 Show a loading spinner in tags selector
Diffstat (limited to 'server/sonar-web/src/main/js/api/issues.ts')
-rw-r--r-- | server/sonar-web/src/main/js/api/issues.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/api/issues.ts b/server/sonar-web/src/main/js/api/issues.ts index 9830e627e54..f5ec6453bcc 100644 --- a/server/sonar-web/src/main/js/api/issues.ts +++ b/server/sonar-web/src/main/js/api/issues.ts @@ -20,6 +20,7 @@ import { FacetValue } from '../app/types'; import { getJSON, post, postJSON, RequestData } from '../helpers/request'; import { RawIssue } from '../helpers/issues'; +import throwGlobalError from '../app/utils/throwGlobalError'; export interface IssueResponse { components?: Array<{}>; @@ -117,7 +118,9 @@ export function getIssuesCount(query: RequestData): Promise<any> { export function searchIssueTags( data: { organization?: string; ps?: number; q?: string } = { ps: 100 } ): Promise<string[]> { - return getJSON('/api/issues/tags', data).then(r => r.tags); + return getJSON('/api/issues/tags', data) + .then(r => r.tags) + .catch(throwGlobalError); } export function getIssueChangelog(issue: string): Promise<any> { |