14 Feb, 2013
2 commits
-
Status code 422 (Unprocessable Entity) returned if invalid url is given when creating or updating a project hook.
-
When the project limit is reached the user is not allowed to create new ones. Instead of error code 404 the status code 403 (Forbidden) is returned with error message via API.
13 Feb, 2013
4 commits
-
Extracted a method for 400 error (Bad request) and adjusted code accordingly. The name of the missing attribute is used to show which one was missing from the request. It is used to give an appropriate message in the json response.
-
When using project snippets via API the functions now provide status codes for different situations other then only returning 404 error. If required parameters are missing, e.g. `title` when creating a project snippet a 400 (Bad request) error is returned. The snippet delete function now is idempotent and returns a 200 (Ok) regardless if the snippet with the given id is available or not. Changing return codes of these functions has the advantage that the 404 error is used only for resources, which are not available. Tests added to check these status codes when handling project snippets.
12 Feb, 2013
1 commit
-
Different status codes in the API lib are returned on hook creation, update or deletion. If a required parameter is not given (e.g. `url` in `/projects/:id/hooks/:hook_id`) status code 400 (Bad request) is returned. On hook deletion a 200 status code is returned, regardless if the hook is present or not. This makes the DELETE function an idempotent operation. Appropriate tests are added to check these status codes.
09 Feb, 2013
1 commit
-
Instead of using funtion `error!` the function `not_found!` is used to return 404 error. Adjusted documentation accordingly.
08 Feb, 2013
4 commits
-
Accessing a repository branch that does not exist returns a 404 error instead of 200 now. Added a test.
-
When adding a project hook a url must be specified or a 400 error code is returned * Specs added to check status code on handling project hooks * refactored code, extracted a method
-
When a user is added to a project that is already a member of, a status code 201 is now returned to signal an idempotent operation. If something fails then instead of returning error code 404 different more specific error codes are returned. Status code 400 (Bad request) is returned when a required attribute, e.g. `access_level` is not given or 422 if there is a semantic error, e.g. should the `access_level` have an unsupported value. Specs are added to check these status codes.
07 Feb, 2013
2 commits
06 Feb, 2013
5 commits
-
If a note is created with a POST request via API (`/projects/:id/notes`) status code 400 is returned instead of 404. The resource itself exists but the request is incomplete. Specs added to check different status codes when accessing, creating and updating notes.
-
If a milestone is created via API but no title given then status code 400 (Bad request) is returned instead of 404. A small helper method handles the errors collection of a milestone.
-
Creating a comment to an existing merge request via API without providing a note returns a status code 400 now, suggesting a bad request. The reason for this is the resource itself (MR) exists but the required property is not set.
-
Using the API library to create or update a merge request at the moment a 404 error is returned. This is fine when the merge request in question does not exist, but does not provide good information that for example a required attribute is missing. A status code of 400 (Bad request) is returned when creating or updating a merge request when either `source_branch` or `target_branch` is missing. A status code of 409 is returned when `source_branch` and `target_branch` are the same. Tests are added for these cases.
05 Feb, 2013
2 commits
04 Feb, 2013
1 commit
03 Feb, 2013
1 commit
01 Feb, 2013
3 commits
-
The attempt to revoke project access for a user that was not member of the project results in a 500 Internal Server error where it actually should result in a 200 OK since after the operation, the user is not member of the project. This turns the operation into an idempotent call that can be repeated with no ill effects. Updated the spec and changed the code accordingly. However, the result differs slightly, as we can't return the users project access level if the user was not member. I'm not aware if anybody relies on the result of this call. Fixes #2832
31 Jan, 2013
4 commits
-
Added methods to protect and unprotect branches in from the API
-
… bladealslayer-extend_user_api Conflicts: spec/requests/api/users_spec.rb
29 Jan, 2013
1 commit
18 Jan, 2013
1 commit
17 Jan, 2013
1 commit
16 Jan, 2013
1 commit
-
'namespace' should be exposed via the API
04 Jan, 2013
1 commit
02 Jan, 2013
3 commits
-
Since it's now an integral part of the project name, it should be visible via the API.
22 Dec, 2012
1 commit
21 Dec, 2012
1 commit