summaryrefslogtreecommitdiff
path: root/git-mirror-gitlab-ce
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-12-16 14:13:37 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-12-16 14:13:37 -0500
commit1714205f993f91f9dae9d2b7d77e51286bf38703 (patch)
tree7a7e664cd8b643e0c65b3038df37b70703d7119e /git-mirror-gitlab-ce
parentfd8b6d5e0763d1c7348f6db9c681c1b2d1308f37 (diff)
Better errors
Diffstat (limited to 'git-mirror-gitlab-ce')
-rwxr-xr-xgit-mirror-gitlab-ce8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-mirror-gitlab-ce b/git-mirror-gitlab-ce
index 87477ff..6502618 100755
--- a/git-mirror-gitlab-ce
+++ b/git-mirror-gitlab-ce
@@ -76,7 +76,7 @@ class GitLabCE < GitMirrorBackend
when "404"
@cache[:info] = nil
else
- raise Error.new(res)
+ raise Error.new([res, res.body])
end
end
return @cache[:info]
@@ -117,7 +117,7 @@ class GitLabCE < GitMirrorBackend
req.body = JSON::dump(map)
res = @gl.connection(req.uri).request(req)
if res.code != "201"
- raise Error.new(res)
+ raise Error.new([res, res.body])
end
self.info = JSON::parse(res.body)
else
@@ -129,7 +129,7 @@ class GitLabCE < GitMirrorBackend
req.body = JSON::dump(map)
res = @gl.connection(req.uri).request(req)
if res.code != "200"
- raise Error.new(res)
+ raise Error.new([res, res.body])
end
self.info = JSON::parse(res.body)
end
@@ -141,7 +141,7 @@ class GitLabCE < GitMirrorBackend
req.add_field("PRIVATE-TOKEN", @gl.config['apikey'])
res = @gl.connection(req.uri).request(req)
if res.code != "200"
- raise Error.new(res)
+ raise Error.new([res, res.body])
end
page = JSON::parse(res.body)
page.each do |namespace|