summaryrefslogtreecommitdiff
path: root/lib/gitlab_net.rb
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2018-07-31 10:49:41 +1000
committerAsh McKenzie <amckenzie@gitlab.com>2018-08-01 00:24:17 +1000
commitbe5b38f5338a7a4fc48229990480b144a1499903 (patch)
tree07b2deb6501b018b4e31e903e5d4c689a1b24c58 /lib/gitlab_net.rb
parentac424489fc73ae06e4fd25e2135aebc30972df49 (diff)
downloadgitlab-shell-be5b38f5338a7a4fc48229990480b144a1499903.tar.gz
Rename NotFound -> NotFoundError
Diffstat (limited to 'lib/gitlab_net.rb')
-rw-r--r--lib/gitlab_net.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb
index 3bc8f2d..29a91f4 100644
--- a/lib/gitlab_net.rb
+++ b/lib/gitlab_net.rb
@@ -95,14 +95,14 @@ class GitlabNet
def post_receive(gl_repository, identifier, changes)
params = { gl_repository: gl_repository, identifier: identifier, changes: changes }
resp = post("#{internal_api_endpoint}/post_receive", params)
- raise NotFound if resp.code == HTTP_NOT_FOUND
+ raise NotFoundError if resp.code == HTTP_NOT_FOUND
JSON.parse(resp.body) if resp.code == HTTP_SUCCESS
end
def pre_receive(gl_repository)
resp = post("#{internal_api_endpoint}/pre_receive", gl_repository: gl_repository)
- raise NotFound if resp.code == HTTP_NOT_FOUND
+ raise NotFoundError if resp.code == HTTP_NOT_FOUND
JSON.parse(resp.body) if resp.code == HTTP_SUCCESS
end