API returns 404 when creating duplicate project
Created by: sklise
A clone of: https://gitlab.com/gitlab-org/gitlab-ce/issues/37
When doing the following:
curl -H 'PRIVATE-TOKEN: SECRET' -H 'CONTENT-TYPE: application/json' --data '{"projectname":"some-project"}' -D - -X POST http://localhost:3000/api/v3/projects
The response returns a new project object. If I run the exact same curl command again I get the following response:
HTTP/1.1 404 Not Found
Date: Mon, 27 Jan 2014 18:30:57 GMT
Status: 404 Not Found
Connection: close
Content-Type: application/json
Content-Length: 27
Cache-Control: no-cache
X-Request-Id: e595ce36-4ad6-4ecd-b373-16971f1616c8
X-Runtime: 0.305844
Set-Cookie: __profilin=p%3Dt; path=/
Set-Cookie: __profilin=p%3Dt; path=/
{"message":"404 Not Found"}
The response code should reveal that there this is a duplicate project.