aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorChris Shyi <chrisshyi13@gmail.com>2020-10-12 21:44:56 +0800
committerGitHub <noreply@github.com>2020-10-12 14:44:56 +0100
commitc752ccee6425091cf17c98029f039f3fe66552b4 (patch)
tree1fd499117672e13c6323f433577ad98f1d4a197d /models
parent0e4f663126dbd39266e56203cca48b8a5aa85ee6 (diff)
downloadgitea-c752ccee6425091cf17c98029f039f3fe66552b4.tar.gz
gitea-c752ccee6425091cf17c98029f039f3fe66552b4.zip
Improve error feedback for duplicate deploy keys (#13112)
Instead of a generic HTTP 500 error page, a flash message is rendered with the deploy key page template to inform the user that a key with the intended title already exists. Fixes #13110
Diffstat (limited to 'models')
-rw-r--r--models/error.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/error.go b/models/error.go
index 1cab19aafd..364924c996 100644
--- a/models/error.go
+++ b/models/error.go
@@ -547,7 +547,7 @@ func IsErrDeployKeyNameAlreadyUsed(err error) bool {
}
func (err ErrDeployKeyNameAlreadyUsed) Error() string {
- return fmt.Sprintf("public key already exists [repo_id: %d, name: %s]", err.RepoID, err.Name)
+ return fmt.Sprintf("public key with name already exists [repo_id: %d, name: %s]", err.RepoID, err.Name)
}
// _____ ___________ __