summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-mirror-gitlab-ce8
-rwxr-xr-xgit-mirror-gitlab-ee2
2 files changed, 5 insertions, 5 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|
diff --git a/git-mirror-gitlab-ee b/git-mirror-gitlab-ee
index 80a6d37..aaca9b7 100755
--- a/git-mirror-gitlab-ee
+++ b/git-mirror-gitlab-ee
@@ -104,7 +104,7 @@ class GitLabEE < GitLabCE
req.add_field("PRIVATE-TOKEN", self.config['apikey'])
res = self.connection(req.uri).request(req)
if res.code != "200"
- raise Error.new(res)
+ raise Error.new([res, res.body])
end
user = JSON::parse(res.body)
return user["id"]