aboutsummaryrefslogtreecommitdiffstats
path: root/models/asymkey/error.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/asymkey/error.go')
-rw-r--r--models/asymkey/error.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/models/asymkey/error.go b/models/asymkey/error.go
index 03bc82302f..2e65d76612 100644
--- a/models/asymkey/error.go
+++ b/models/asymkey/error.go
@@ -217,6 +217,7 @@ func (err ErrGPGKeyAccessDenied) Unwrap() error {
// ErrKeyAccessDenied represents a "KeyAccessDenied" kind of error.
type ErrKeyAccessDenied struct {
UserID int64
+ RepoID int64
KeyID int64
Note string
}
@@ -228,8 +229,8 @@ func IsErrKeyAccessDenied(err error) bool {
}
func (err ErrKeyAccessDenied) Error() string {
- return fmt.Sprintf("user does not have access to the key [user_id: %d, key_id: %d, note: %s]",
- err.UserID, err.KeyID, err.Note)
+ return fmt.Sprintf("user does not have access to the key [user_id: %d, repo_id: %d, key_id: %d, note: %s]",
+ err.UserID, err.RepoID, err.KeyID, err.Note)
}
func (err ErrKeyAccessDenied) Unwrap() error {