mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
Move json errors over to gmsl (#3080)
This commit is contained in:
parent
a49c9f01e2
commit
0489d16f95
109 changed files with 808 additions and 1217 deletions
|
@ -21,7 +21,6 @@ import (
|
|||
|
||||
"github.com/getsentry/sentry-go"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/matrix-org/dendrite/clientapi/jsonerror"
|
||||
"github.com/matrix-org/dendrite/internal/httputil"
|
||||
relayInternal "github.com/matrix-org/dendrite/relayapi/internal"
|
||||
"github.com/matrix-org/dendrite/setup/config"
|
||||
|
@ -59,7 +58,7 @@ func Setup(
|
|||
if err != nil {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusBadRequest,
|
||||
JSON: jsonerror.InvalidUsername("Username was invalid"),
|
||||
JSON: spec.InvalidUsername("Username was invalid"),
|
||||
}
|
||||
}
|
||||
return SendTransactionToRelay(
|
||||
|
@ -84,7 +83,7 @@ func Setup(
|
|||
if err != nil {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusBadRequest,
|
||||
JSON: jsonerror.InvalidUsername("Username was invalid"),
|
||||
JSON: spec.InvalidUsername("Username was invalid"),
|
||||
}
|
||||
}
|
||||
return GetTransactionFromRelay(httpReq, request, relayAPI, *userID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue