Add task identifier #115

Merged
konrad merged 15 commits from feature/task-identifier into master 2019-12-07 22:28:47 +00:00
2 changed files with 6 additions and 1 deletions
Showing only changes of commit 2485a65aad - Show all commits

View File

@ -33,6 +33,7 @@ This document describes the different errors Vikunja can return.
| 3004 | 403 | The user needs to have read permissions on that list to perform that action. |
| 3005 | 400 | The list title cannot be empty. |
| 3006 | 404 | The list share does not exist. |
| 3007 | 400 | A list with this identifier already exists. |
| 4001 | 400 | The list task text cannot be empty. |
| 4002 | 404 | The list task does not exist. |
| 4003 | 403 | All bulk editing tasks must belong to the same list. |

View File

@ -491,7 +491,11 @@ const ErrCodeListIdentifierIsNotUnique = 3007
// HTTPError holds the http error description
func (err ErrListIdentifierIsNotUnique) HTTPError() web.HTTPError {
return web.HTTPError{HTTPCode: http.StatusNotFound, Code: ErrCodeListIdentifierIsNotUnique, Message: "There already exists a list with this identifier."}
return web.HTTPError{
HTTPCode: http.StatusBadRequest,
Code: ErrCodeListIdentifierIsNotUnique,
Message: "A list with this identifier already exists.",
}
}
// ================