mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 00:03:09 -06:00
Return unauthorised instead of forbidden
This commit is contained in:
parent
fed8ccc3da
commit
cb9f319e11
|
|
@ -590,7 +590,10 @@ func handleRegistrationFlow(
|
|||
// TODO: email / msisdn auth types.
|
||||
accessToken, accessTokenErr := auth.ExtractAccessToken(req)
|
||||
if accessTokenErr != nil {
|
||||
return util.MessageResponse(http.StatusForbidden, "Access token error: "+accessTokenErr.Error())
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusUnauthorized,
|
||||
JSON: jsonerror.MissingToken(accessTokenErr.Error()),
|
||||
}
|
||||
}
|
||||
|
||||
// Appservices are special and are not affected by disabled
|
||||
|
|
|
|||
Loading…
Reference in a new issue