1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-19 16:58:37 +00:00

Refactor error system (#33771)

It should not expose `util.SilentWrap` or construct it manually.
This commit is contained in:
wxiaoguang
2025-03-03 13:36:10 +08:00
committed by GitHub
parent dbed39d632
commit 216243eee2
12 changed files with 41 additions and 58 deletions

View File

@@ -25,7 +25,7 @@ func (err ErrKeyUnableVerify) Error() string {
}
// ErrKeyIsPrivate is returned when the provided key is a private key not a public key
var ErrKeyIsPrivate = util.NewSilentWrapErrorf(util.ErrInvalidArgument, "the provided key is a private key")
var ErrKeyIsPrivate = util.ErrorWrap(util.ErrInvalidArgument, "the provided key is a private key")
// ErrKeyNotExist represents a "KeyNotExist" kind of error.
type ErrKeyNotExist struct {