go.tools/dashboard: include builder in "invalid key" error message

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/77250043
This commit is contained in:
Andrew Gerrand 2014-03-18 16:02:54 +11:00
parent 84fae1b215
commit 5893c271ff
1 changed files with 1 additions and 1 deletions

View File

@ -381,7 +381,7 @@ func AuthHandler(h dashHandler) http.HandlerFunc {
key := r.FormValue("key") key := r.FormValue("key")
builder := r.FormValue("builder") builder := r.FormValue("builder")
if r.Method == "POST" && !validKey(c, key, builder) { if r.Method == "POST" && !validKey(c, key, builder) {
err = errors.New("invalid key: " + key) err = fmt.Errorf("invalid key %q for builder %q", key, builder)
} }
// Call the original HandlerFunc and return the response. // Call the original HandlerFunc and return the response.