mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 22:02:46 +00:00
Remove httputil.LogThenError so that the line numbers are reported properly - make error reporting slightly more useful (#879)
This commit is contained in:
parent
72565f2eeb
commit
59a1f4b8ed
37 changed files with 302 additions and 178 deletions
|
@ -18,7 +18,6 @@ import (
|
|||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/matrix-org/dendrite/clientapi/httputil"
|
||||
"github.com/matrix-org/dendrite/clientapi/jsonerror"
|
||||
"github.com/matrix-org/dendrite/clientapi/producers"
|
||||
"github.com/matrix-org/dendrite/common/config"
|
||||
|
@ -78,7 +77,8 @@ func Invite(
|
|||
}}
|
||||
verifyResults, err := keys.VerifyJSONs(httpReq.Context(), verifyRequests)
|
||||
if err != nil {
|
||||
return httputil.LogThenError(httpReq, err)
|
||||
util.GetLogger(httpReq.Context()).WithError(err).Error("keys.VerifyJSONs failed")
|
||||
return jsonerror.InternalServerError()
|
||||
}
|
||||
if verifyResults[0].Error != nil {
|
||||
return util.JSONResponse{
|
||||
|
@ -94,7 +94,8 @@ func Invite(
|
|||
|
||||
// Add the invite event to the roomserver.
|
||||
if err = producer.SendInvite(httpReq.Context(), signedEvent); err != nil {
|
||||
return httputil.LogThenError(httpReq, err)
|
||||
util.GetLogger(httpReq.Context()).WithError(err).Error("producer.SendInvite failed")
|
||||
return jsonerror.InternalServerError()
|
||||
}
|
||||
|
||||
// Return the signed event to the originating server, it should then tell
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue