Add debug logging for incoming CSAPI calls on authentication failure

Will help to debug Complement failures, and just generally useful.
This commit is contained in:
Kegan Dougal 2022-01-28 10:28:21 +00:00
parent b626143694
commit 1e41383d04

View file

@ -55,6 +55,7 @@ func MakeAuthAPI(
h := func(req *http.Request) util.JSONResponse { h := func(req *http.Request) util.JSONResponse {
device, err := auth.VerifyUserFromRequest(req, userAPI) device, err := auth.VerifyUserFromRequest(req, userAPI)
if err != nil { if err != nil {
util.GetLogger((req.Context())).Debugf("VerifyUserFromRequest %s -> HTTP %d", req.RemoteAddr, err.Code)
return *err return *err
} }
// add the user ID to the logger // add the user ID to the logger