add a few debug logs

This commit is contained in:
Sam Wedgwood 2023-07-18 15:42:08 +01:00
parent 19d420e3b2
commit 14d4043b41
2 changed files with 3 additions and 0 deletions

View file

@ -143,6 +143,7 @@ func QueryRoomHierarchy(req *http.Request, device *userapi.Device, roomIDStr str
if err != nil { if err != nil {
switch err.(type) { switch err.(type) {
case roomserverAPI.ErrRoomUnknownOrNotAllowed: case roomserverAPI.ErrRoomUnknownOrNotAllowed:
util.GetLogger(req.Context()).WithError(err).Debugln("room unknown/forbidden when handling CS room hierarchy request")
return util.JSONResponse{ return util.JSONResponse{
Code: http.StatusForbidden, Code: http.StatusForbidden,
JSON: spec.Forbidden("room is unknown/forbidden"), JSON: spec.Forbidden("room is unknown/forbidden"),

View file

@ -151,6 +151,7 @@ func QueryRoomHierarchy(httpReq *http.Request, request *fclient.FederationReques
if err != nil { if err != nil {
switch err.(type) { switch err.(type) {
case roomserverAPI.ErrRoomUnknownOrNotAllowed: case roomserverAPI.ErrRoomUnknownOrNotAllowed:
util.GetLogger(httpReq.Context()).WithError(err).Debugln("room unknown/forbidden when handling SS room hierarchy request")
return util.JSONResponse{ return util.JSONResponse{
Code: http.StatusNotFound, Code: http.StatusNotFound,
JSON: spec.NotFound("room is unknown/forbidden"), JSON: spec.NotFound("room is unknown/forbidden"),
@ -165,6 +166,7 @@ func QueryRoomHierarchy(httpReq *http.Request, request *fclient.FederationReques
} }
if len(discoveredRooms) == 0 { if len(discoveredRooms) == 0 {
util.GetLogger(httpReq.Context()).Debugln("no rooms found when handling SS room hierarchy request")
return util.JSONResponse{ return util.JSONResponse{
Code: 404, Code: 404,
JSON: spec.NotFound("room is unknown/forbidden"), JSON: spec.NotFound("room is unknown/forbidden"),