mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-15 21:52:25 +03: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
|
@ -23,7 +23,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
|
||||
"github.com/matrix-org/dendrite/clientapi/httputil"
|
||||
"github.com/matrix-org/dendrite/clientapi/jsonerror"
|
||||
"github.com/matrix-org/dendrite/common/config"
|
||||
"github.com/matrix-org/gomatrix"
|
||||
"github.com/matrix-org/util"
|
||||
|
@ -56,7 +56,8 @@ func RequestTurnServer(req *http.Request, device *authtypes.Device, cfg *config.
|
|||
_, err := mac.Write([]byte(resp.Username))
|
||||
|
||||
if err != nil {
|
||||
return httputil.LogThenError(req, err)
|
||||
util.GetLogger(req.Context()).WithError(err).Error("mac.Write failed")
|
||||
return jsonerror.InternalServerError()
|
||||
}
|
||||
|
||||
resp.Username = fmt.Sprintf("%d:%s", expiry, device.UserID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue