Better error for unexpected "room doesn't exist"

Signed-off-by: Alex Chen <minecnly@gmail.com>
This commit is contained in:
Cnly 2019-07-18 19:05:44 +08:00
parent bb44e6de49
commit b982eb2095

View file

@ -108,10 +108,8 @@ func GetEvent(
}
if !stateResp.RoomExists {
return util.JSONResponse{
Code: http.StatusNotFound,
JSON: jsonerror.NotFound("The event was not found or you do not have permission to read this event."),
}
util.GetLogger(req.Context()).Errorf("Room not found for event %s", r.requestedEvent.EventID())
return jsonerror.InternalServerError()
}
if !stateResp.PrevEventsExist {