From b982eb20959d991c09c96832418ab5c6fbf5cd29 Mon Sep 17 00:00:00 2001 From: Cnly Date: Thu, 18 Jul 2019 19:05:44 +0800 Subject: [PATCH] Better error for unexpected "room doesn't exist" Signed-off-by: Alex Chen --- clientapi/routing/getevent.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clientapi/routing/getevent.go b/clientapi/routing/getevent.go index fe74ce913..26d85e3a1 100644 --- a/clientapi/routing/getevent.go +++ b/clientapi/routing/getevent.go @@ -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 {