add punctuation and comments for errors
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
viehlieb 2023-02-23 15:52:16 +01:00
parent 584fa51a2a
commit 183b870c6d
2 changed files with 5 additions and 3 deletions

View File

@ -111,9 +111,9 @@ This document describes the different errors Vikunja can return.
| 6005 | 409 | The user is already a member of that team. |
| 6006 | 400 | Cannot delete the last team member. |
| 6007 | 403 | The team does not have access to the list to perform that action. |
| 6008 | 400 | There are no teams found with that team name |
| 6009 | 400 | There is no oidc team with that team name and oidcId |
| 6010 | 400 | There are no oidc teams found for the user |
| 6008 | 400 | There are no teams found with that team name. |
| 6009 | 400 | There is no oidc team with that team name and oidcId. |
| 6010 | 400 | There are no oidc teams found for the user. |

View File

@ -1190,6 +1190,7 @@ func (err ErrTeamDoesNotHaveAccessToList) HTTPError() web.HTTPError {
return web.HTTPError{HTTPCode: http.StatusForbidden, Code: ErrCodeTeamDoesNotHaveAccessToList, Message: "This team does not have access to the list."}
}
// ErrTeamsDoNotExist represents an error where Teams searched via non-unique name do not exist.
type ErrTeamsDoNotExist struct {
Name string
}
@ -1224,6 +1225,7 @@ func IsErrOIDCTeamDoesNotExist(err error) bool {
return ok
}
// ErrTeamDoesNotExist represents an error where a team does not exist
func (err ErrOIDCTeamDoesNotExist) Error() string {
return fmt.Sprintf("No Team with that name and valid property oidcId could be found [Team Name: %v] [OidcId : %v] ", err.Name, err.OidcID)
}