summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/asymkey/ssh_key_fingerprint.go5
-rw-r--r--models/asymkey/ssh_key_parse.go5
-rw-r--r--models/asymkey/ssh_key_principals.go4
-rw-r--r--models/org_team.go5
-rw-r--r--models/packages/conan/references.go6
-rw-r--r--models/packages/container/search.go4
-rw-r--r--models/packages/package.go6
-rw-r--r--models/packages/package_blob.go4
-rw-r--r--models/packages/package_blob_upload.go3
-rw-r--r--models/packages/package_cleanup_rule.go4
-rw-r--r--models/packages/package_file.go6
-rw-r--r--models/packages/package_version.go3
-rw-r--r--models/project/project.go3
-rw-r--r--models/repo/mirror.go4
-rw-r--r--models/repo/pushmirror.go6
-rw-r--r--models/repo/release.go3
-rw-r--r--models/repo/repo_list.go3
-rw-r--r--models/unittest/fscopy.go2
-rw-r--r--models/user/email_address.go3
-rw-r--r--models/user/openid.go3
20 files changed, 36 insertions, 46 deletions
diff --git a/models/asymkey/ssh_key_fingerprint.go b/models/asymkey/ssh_key_fingerprint.go
index ca0334cc0b..8a8d4fce15 100644
--- a/models/asymkey/ssh_key_fingerprint.go
+++ b/models/asymkey/ssh_key_fingerprint.go
@@ -5,7 +5,6 @@ package asymkey
import (
"context"
- "errors"
"fmt"
"strings"
@@ -59,9 +58,9 @@ func calcFingerprintSSHKeygen(publicKeyContent string) (string, error) {
if strings.Contains(stderr, "is not a public key file") {
return "", ErrKeyUnableVerify{stderr}
}
- return "", fmt.Errorf("'ssh-keygen -lf %s' failed with error '%s': %s", tmpPath, err, stderr)
+ return "", util.NewInvalidArgumentErrorf("'ssh-keygen -lf %s' failed with error '%s': %s", tmpPath, err, stderr)
} else if len(stdout) < 2 {
- return "", errors.New("not enough output for calculating fingerprint: " + stdout)
+ return "", util.NewInvalidArgumentErrorf("not enough output for calculating fingerprint: %s", stdout)
}
return strings.Split(stdout, " ")[1], nil
}
diff --git a/models/asymkey/ssh_key_parse.go b/models/asymkey/ssh_key_parse.go
index b3eecb2c9b..1df6db6fa7 100644
--- a/generated by cgit v1.2.3 (git 2.39.1) at 2025-01-16 04:03:38 +0000