mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Merge branch 'master' into neilalexander/fix1016
This commit is contained in:
commit
cc1b1bd200
2
go.mod
2
go.mod
|
|
@ -17,7 +17,7 @@ require (
|
|||
github.com/matrix-org/go-http-js-libp2p v0.0.0-20200318135427-31631a9ef51f
|
||||
github.com/matrix-org/go-sqlite3-js v0.0.0-20200325174927-327088cdef10
|
||||
github.com/matrix-org/gomatrix v0.0.0-20190528120928-7df988a63f26
|
||||
github.com/matrix-org/gomatrixserverlib v0.0.0-20200507150553-025991c971ea
|
||||
github.com/matrix-org/gomatrixserverlib v0.0.0-20200511150133-f4a8869b5366
|
||||
github.com/matrix-org/naffka v0.0.0-20200422140631-181f1ee7401f
|
||||
github.com/matrix-org/util v0.0.0-20190711121626-527ce5ddefc7
|
||||
github.com/mattn/go-sqlite3 v2.0.2+incompatible
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -367,8 +367,8 @@ github.com/matrix-org/gomatrix v0.0.0-20190528120928-7df988a63f26 h1:Hr3zjRsq2bh
|
|||
github.com/matrix-org/gomatrix v0.0.0-20190528120928-7df988a63f26/go.mod h1:3fxX6gUjWyI/2Bt7J1OLhpCzOfO/bB3AiX0cJtEKud0=
|
||||
github.com/matrix-org/gomatrixserverlib v0.0.0-20200124100636-0c2ec91d1df5 h1:kmRjpmFOenVpOaV/DRlo9p6z/IbOKlUC+hhKsAAh8Qg=
|
||||
github.com/matrix-org/gomatrixserverlib v0.0.0-20200124100636-0c2ec91d1df5/go.mod h1:FsKa2pWE/bpQql9H7U4boOPXFoJX/QcqaZZ6ijLkaZI=
|
||||
github.com/matrix-org/gomatrixserverlib v0.0.0-20200507150553-025991c971ea h1:1qfbSjg3PwULY68AVRdZ3QIJoccNMbre0mSR7m7mqI4=
|
||||
github.com/matrix-org/gomatrixserverlib v0.0.0-20200507150553-025991c971ea/go.mod h1:JsAzE1Ll3+gDWS9JSUHPJiiyAksvOOnGWF2nXdg4ZzU=
|
||||
github.com/matrix-org/gomatrixserverlib v0.0.0-20200511150133-f4a8869b5366 h1:LbtCldIuE/kEgGnzKm6xebnZDfDie1vQA0mDq7ReyM4=
|
||||
github.com/matrix-org/gomatrixserverlib v0.0.0-20200511150133-f4a8869b5366/go.mod h1:JsAzE1Ll3+gDWS9JSUHPJiiyAksvOOnGWF2nXdg4ZzU=
|
||||
github.com/matrix-org/naffka v0.0.0-20200127221512-0716baaabaf1 h1:osLoFdOy+ChQqVUn2PeTDETFftVkl4w9t/OW18g3lnk=
|
||||
github.com/matrix-org/naffka v0.0.0-20200127221512-0716baaabaf1/go.mod h1:cXoYQIENbdWIQHt1SyCo6Bl3C3raHwJ0wgVrXHSqf+A=
|
||||
github.com/matrix-org/naffka v0.0.0-20200422140631-181f1ee7401f h1:pRz4VTiRCO4zPlEMc3ESdUOcW4PXHH4Kj+YDz1XyE+Y=
|
||||
|
|
|
|||
|
|
@ -118,7 +118,10 @@ func Download(
|
|||
)
|
||||
if err != nil {
|
||||
// TODO: Handle the fact we might have started writing the response
|
||||
dReq.jsonErrorResponse(w, util.ErrorResponse(err))
|
||||
dReq.jsonErrorResponse(w, util.JSONResponse{
|
||||
Code: http.StatusNotFound,
|
||||
JSON: jsonerror.NotFound("Failed to download: " + err.Error()),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -138,7 +141,7 @@ func (r *downloadRequest) jsonErrorResponse(w http.ResponseWriter, res util.JSON
|
|||
if err != nil {
|
||||
r.Logger.WithError(err).Error("Failed to marshal JSONResponse")
|
||||
// this should never fail to be marshalled so drop err to the floor
|
||||
res = util.MessageResponse(http.StatusInternalServerError, "Internal Server Error")
|
||||
res = util.MessageResponse(http.StatusNotFound, "Download request failed: "+err.Error())
|
||||
resBytes, _ = json.Marshal(res.JSON)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -264,3 +264,4 @@ User can invite local user to room with version 5
|
|||
remote user can join room with version 5
|
||||
User can invite remote user to room with version 5
|
||||
Remote user can backfill in a room with version 5
|
||||
Alternative server names do not cause a routing loop
|
||||
|
|
|
|||
Loading…
Reference in a new issue