mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +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:
parent
2ef33b5338
commit
30787e48f2
7 changed files with 26 additions and 12 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue