This commit is contained in:
Travis Ralston 2024-05-03 11:35:38 -06:00
parent 5ba006e217
commit 436ae9e97b

View File

@ -190,7 +190,10 @@ func (h *SyncLiveHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
w.WriteHeader(http.StatusMethodNotAllowed)
// This is a standard error response.
// See M_UNRECOGNIZED in https://spec.matrix.org/v1.10/client-server-api/#common-error-codes
w.Write([]byte("{\"errcode\":\"M_UNRECOGNIZED\",\"error\":\"Wrong request method\"}"))
_, err := w.Write([]byte("{\"errcode\":\"M_UNRECOGNIZED\",\"error\":\"Wrong request method\"}"))
if err != nil {
internal.DecorateLogger(req.Context(), log.Error()).Err(err)
}
return
}
err := h.serve(w, req)