Make create-account
more verbose
This commit is contained in:
parent
f009e54181
commit
6f000e9801
|
@ -177,7 +177,7 @@ func sharedSecretRegister(sharedSecret, serverURL, localpart, password string, a
|
||||||
defer regResp.Body.Close() // nolint: errcheck
|
defer regResp.Body.Close() // nolint: errcheck
|
||||||
if regResp.StatusCode < 200 || regResp.StatusCode >= 300 {
|
if regResp.StatusCode < 200 || regResp.StatusCode >= 300 {
|
||||||
body, _ = io.ReadAll(regResp.Body)
|
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)
|
r, err := io.ReadAll(regResp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue