mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-09 15:13:12 -06:00
add a few debug logs
This commit is contained in:
parent
19d420e3b2
commit
14d4043b41
|
|
@ -143,6 +143,7 @@ func QueryRoomHierarchy(req *http.Request, device *userapi.Device, roomIDStr str
|
|||
if err != nil {
|
||||
switch err.(type) {
|
||||
case roomserverAPI.ErrRoomUnknownOrNotAllowed:
|
||||
util.GetLogger(req.Context()).WithError(err).Debugln("room unknown/forbidden when handling CS room hierarchy request")
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusForbidden,
|
||||
JSON: spec.Forbidden("room is unknown/forbidden"),
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ func QueryRoomHierarchy(httpReq *http.Request, request *fclient.FederationReques
|
|||
if err != nil {
|
||||
switch err.(type) {
|
||||
case roomserverAPI.ErrRoomUnknownOrNotAllowed:
|
||||
util.GetLogger(httpReq.Context()).WithError(err).Debugln("room unknown/forbidden when handling SS room hierarchy request")
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusNotFound,
|
||||
JSON: spec.NotFound("room is unknown/forbidden"),
|
||||
|
|
@ -165,6 +166,7 @@ func QueryRoomHierarchy(httpReq *http.Request, request *fclient.FederationReques
|
|||
}
|
||||
|
||||
if len(discoveredRooms) == 0 {
|
||||
util.GetLogger(httpReq.Context()).Debugln("no rooms found when handling SS room hierarchy request")
|
||||
return util.JSONResponse{
|
||||
Code: 404,
|
||||
JSON: spec.NotFound("room is unknown/forbidden"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue