diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/asymkey/ssh_key_fingerprint.go | 5 | ||||
-rw-r--r-- | models/asymkey/ssh_key_parse.go | 5 | ||||
-rw-r--r-- | models/asymkey/ssh_key_principals.go | 4 | ||||
-rw-r--r-- | models/org_team.go | 5 | ||||
-rw-r--r-- | models/packages/conan/references.go | 6 | ||||
-rw-r--r-- | models/packages/container/search.go | 4 | ||||
-rw-r--r-- | models/packages/package.go | 6 | ||||
-rw-r--r-- | models/packages/package_blob.go | 4 | ||||
-rw-r--r-- | models/packages/package_blob_upload.go | 3 | ||||
-rw-r--r-- | models/packages/package_cleanup_rule.go | 4 | ||||
-rw-r--r-- | models/packages/package_file.go | 6 | ||||
-rw-r--r-- | models/packages/package_version.go | 3 | ||||
-rw-r--r-- | models/project/project.go | 3 | ||||
-rw-r--r-- | models/repo/mirror.go | 4 | ||||
-rw-r--r-- | models/repo/pushmirror.go | 6 | ||||
-rw-r--r-- | models/repo/release.go | 3 | ||||
-rw-r--r-- | models/repo/repo_list.go | 3 | ||||
-rw-r--r-- | models/unittest/fscopy.go | 2 | ||||
-rw-r--r-- | models/user/email_address.go | 3 | ||||
-rw-r--r-- | models/user/openid.go | 3 |
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 |