0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-25 07:33:49 +01:00

Make create-account more verbose

This commit is contained in:
Neil Alexander 2022-12-01 10:14:26 +00:00
parent f009e54181
commit 6f000e9801
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -177,7 +177,7 @@ func sharedSecretRegister(sharedSecret, serverURL, localpart, password string, a
defer regResp.Body.Close() // nolint: errcheck
if regResp.StatusCode < 200 || regResp.StatusCode >= 300 {
body, _ = io.ReadAll(regResp.Body)
return "", fmt.Errorf(gjson.GetBytes(body, "error").Str)
return "", fmt.Errorf("got HTTP %d error from server: %s", regResp.StatusCode, string(body))
}
r, err := io.ReadAll(regResp.Body)
if err != nil {