Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-22 03:13:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-22 03:13:18 +0300
commit229c115027bc0d1c3c3231f615cf179f48cd5da2 (patch)
tree7aab98001c749aa9f6dd81bfced09797d0fefe35 /lib/gitlab/zentao
parent8d09cf28f7aba7cf7ecbb81daca02c998c1722ae (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/zentao')
-rw-r--r--lib/gitlab/zentao/client.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/zentao/client.rb b/lib/gitlab/zentao/client.rb
index 481dca0b57c..8acfb4913f3 100644
--- a/lib/gitlab/zentao/client.rb
+++ b/lib/gitlab/zentao/client.rb
@@ -33,7 +33,7 @@ module Gitlab
end
def fetch_issue(issue_id)
- raise Gitlab::Zentao::Client::Error unless issue_id_pattern.match(issue_id)
+ raise Gitlab::Zentao::Client::Error, 'invalid issue id' unless issue_id_pattern.match(issue_id)
get("issues/#{issue_id}")
end
@@ -48,11 +48,11 @@ module Gitlab
options = { headers: headers, query: params }
response = Gitlab::HTTP.get(url(path), options)
- raise Gitlab::Zentao::Client::Error unless response.success?
+ raise Gitlab::Zentao::Client::Error, 'request error' unless response.success?
Gitlab::Json.parse(response.body)
rescue JSON::ParserError
- raise Gitlab::Zentao::Client::Error
+ raise Gitlab::Zentao::Client::Error, 'invalid response format'
end
def url(path)