From de5ef2147d3865e2641e0b202418d74009490658 Mon Sep 17 00:00:00 2001 From: viehlieb Date: Tue, 9 May 2023 13:34:23 +0200 Subject: [PATCH] add to error.md change error msg --- docs/content/doc/usage/errors.md | 1 + pkg/models/error.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/content/doc/usage/errors.md b/docs/content/doc/usage/errors.md index 9d850d931..51aecf41a 100644 --- a/docs/content/doc/usage/errors.md +++ b/docs/content/doc/usage/errors.md @@ -44,6 +44,7 @@ This document describes the different errors Vikunja can return. | 1020 | 412 | This user account is disabled. | | 1021 | 412 | This account is managed by a third-party authentication provider. | | 1021 | 412 | The username must not contain spaces. | +| 1022 | 412 | The custom scope set by the OIDC provider is malformed. Please make sure the openid provider sets the data correctly for your scope. Check especially to have set an oidcID. | ## Validation diff --git a/pkg/models/error.go b/pkg/models/error.go index 97e767377..875cffec3 100644 --- a/pkg/models/error.go +++ b/pkg/models/error.go @@ -1231,7 +1231,7 @@ func IsErrOIDCTeamDoesNotExist(err error) bool { // 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) + return fmt.Sprintf("No Team with that name and valid oidcId could be found. [Team Name: %v] [OidcId : %v] ", err.Name, err.OidcID) } // ErrCodeTeamDoesNotExist holds the unique world-error code of this error @@ -1239,7 +1239,7 @@ const ErrCodeOIDCTeamDoesNotExist = 6008 // HTTPError holds the http error description func (err ErrOIDCTeamDoesNotExist) HTTPError() web.HTTPError { - return web.HTTPError{HTTPCode: http.StatusNotFound, Code: ErrCodeTeamDoesNotExist, Message: "No Team with that name and valid property oidcId could be found."} + return web.HTTPError{HTTPCode: http.StatusNotFound, Code: ErrCodeTeamDoesNotExist, Message: "No Team with that name and valid oidcId could be found."} } // ErrOIDCTeamsDoNotExistForUser represents an error where an oidcTeam does not exist for the user