mirror of
https://github.com/matrix-org/dendrite
synced 2024-11-11 20:31:08 +01:00
parent
69f8d5a77e
commit
c725176878
1 changed files with 4 additions and 4 deletions
|
@ -243,8 +243,8 @@ func validateRecaptcha(
|
||||||
) *util.JSONResponse {
|
) *util.JSONResponse {
|
||||||
if !cfg.Matrix.RecaptchaEnabled {
|
if !cfg.Matrix.RecaptchaEnabled {
|
||||||
return &util.JSONResponse{
|
return &util.JSONResponse{
|
||||||
Code: http.StatusBadRequest,
|
Code: http.StatusConflict,
|
||||||
JSON: jsonerror.BadJSON("Captcha registration is disabled"),
|
JSON: jsonerror.Unknown("Captcha registration is disabled"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,8 +279,8 @@ func validateRecaptcha(
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &util.JSONResponse{
|
return &util.JSONResponse{
|
||||||
Code: http.StatusInternalServerError,
|
Code: http.StatusGatewayTimeout,
|
||||||
JSON: jsonerror.BadJSON("Error in contacting captcha server" + err.Error()),
|
JSON: jsonerror.Unknown("Error in contacting captcha server" + err.Error()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err = json.Unmarshal(body, &r)
|
err = json.Unmarshal(body, &r)
|
||||||
|
|
Loading…
Reference in a new issue