[arvados] updated: 2.1.0-2911-g28d7ed94b
git repository hosting
git at public.arvados.org
Tue Sep 20 17:45:24 UTC 2022
Summary of changes:
services/keep-web/handler.go | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
via 28d7ed94b33411909941c72289bc227a38e80cda (commit)
from 26096146e35e14aa334fd31753138935d36caf58 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 28d7ed94b33411909941c72289bc227a38e80cda
Author: Tom Clegg <tom at curii.com>
Date: Tue Sep 20 13:44:12 2022 -0400
19428: Fix failing request on normal failed user lookup case.
refs #19428
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/services/keep-web/handler.go b/services/keep-web/handler.go
index b04add1c4..0c75ac56c 100644
--- a/services/keep-web/handler.go
+++ b/services/keep-web/handler.go
@@ -6,6 +6,7 @@ package keepweb
import (
"encoding/json"
+ "errors"
"fmt"
"html"
"html/template"
@@ -490,7 +491,11 @@ func (h *handler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
http.Error(w, "session cache: "+err.Error(), http.StatusInternalServerError)
}
tokenUser, err = h.Cache.GetTokenUser(arv.ApiToken)
- if err != nil {
+ if e := (interface{ HTTPStatus() int })(nil); errors.As(err, &e) && e.HTTPStatus() == http.StatusForbidden {
+ // Ignore expected error looking up user record when
+ // using a scoped token that allows getting
+ // collections/X but not users/current
+ } else if err != nil {
http.Error(w, "user lookup: "+err.Error(), http.StatusInternalServerError)
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list