mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Improve org error handling (#2117)
* Improve ErrOrgNotExist type Return new error type Use good error check Use new method to check error Update tests * Fix unchanged method name report
This commit is contained in:
committed by
Lunny Xiao
parent
2ef33b5338
commit
30787e48f2
@@ -230,7 +230,7 @@ func NewTeam(t *Team) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
} else if !has {
|
||||
return ErrOrgNotExist
|
||||
return ErrOrgNotExist{t.OrgID, ""}
|
||||
}
|
||||
|
||||
t.LowerName = strings.ToLower(t.Name)
|
||||
|
Reference in New Issue
Block a user