From 1714205f993f91f9dae9d2b7d77e51286bf38703 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 16 Dec 2016 14:13:37 -0500 Subject: Better errors --- git-mirror-gitlab-ce | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'git-mirror-gitlab-ce') 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| -- cgit v1.2.3-2-g168b