mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-09 13:06:41 +00:00
Refactor error system (#33771)
It should not expose `util.SilentWrap` or construct it manually.
This commit is contained in:
@@ -77,7 +77,7 @@ func (err ErrNameCharsNotAllowed) Unwrap() error {
|
||||
func IsUsableName(reservedNames, reservedPatterns []string, name string) error {
|
||||
name = strings.TrimSpace(strings.ToLower(name))
|
||||
if utf8.RuneCountInString(name) == 0 {
|
||||
return util.SilentWrap{Message: "name is empty", Err: util.ErrInvalidArgument}
|
||||
return util.NewInvalidArgumentErrorf("name is empty")
|
||||
}
|
||||
|
||||
for i := range reservedNames {
|
||||
|
Reference in New Issue
Block a user