summaryrefslogtreecommitdiff
path: root/lib/chef_zero
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2014-08-21 17:46:51 -0700
committerJohn Keiser <jkeiser@opscode.com>2014-08-22 09:20:51 -0700
commit558451ec9113c4dea5309623b66d064d0fcdadfc (patch)
tree404c0d4bfd39b336f72bb75dd1dda6e825007867 /lib/chef_zero
parent862a5b9a2ebc799ecbb20fabb8842ec55cf3353d (diff)
downloadchef-zero-558451ec9113c4dea5309623b66d064d0fcdadfc.tar.gz
Make "already in org" do 409, not 403
Diffstat (limited to 'lib/chef_zero')
-rw-r--r--lib/chef_zero/endpoints/organization_association_requests_endpoint.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef_zero/endpoints/organization_association_requests_endpoint.rb b/lib/chef_zero/endpoints/organization_association_requests_endpoint.rb
index 6534ff3..ed1c9ea 100644
--- a/lib/chef_zero/endpoints/organization_association_requests_endpoint.rb
+++ b/lib/chef_zero/endpoints/organization_association_requests_endpoint.rb
@@ -12,8 +12,7 @@ module ChefZero
id = "#{username}-#{orgname}"
if exists_data?(request, [ 'organizations', orgname, 'users', username ])
- # TODO 403? Really?
- raise RestErrorResponse.new(403, "User #{username} is already in organization #{orgname}")
+ raise RestErrorResponse.new(409, "User #{username} is already in organization #{orgname}")
end
create_data(request, request.rest_path, username, '{}')