mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
fix: address verified review findings (labels-milestones-time-1)
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
21 files changed
+262
-47
No files matched your search
@@ -120,6 +120,8 @@ func (e *ConflictError) Unwrap() error { return e.Err }
|
||||
type AmbiguousError struct {
|
||||
Kind, Key, Scope string
|
||||
IDs []int64
|
||||
// Hint replaces the advice to pass an ID where IDs do not select the resource.
|
||||
Hint string
|
||||
}
|
||||
|
||||
func (e *AmbiguousError) Error() string {
|
||||
@@ -131,7 +133,7 @@ func (e *AmbiguousError) Error() string {
|
||||
if e.Scope != "" {
|
||||
text += " in " + e.Scope
|
||||
}
|
||||
return text + " (IDs " + strings.Join(ids, ", ") + "); pass an ID"
|
||||
return text + " (IDs " + strings.Join(ids, ", ") + "); " + cmp.Or(e.Hint, "pass an ID")
|
||||
}
|
||||
|
||||
// refusals maps the messages Gitea gives for refused requests onto conflict reasons. Each entry
|
||||
|
||||
Reference in new issue
Block a user