added error check
This commit is contained in:
parent
2c697c982b
commit
5998378773
|
@ -211,6 +211,12 @@ func AddNewKeyRequestHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
keyOutput, err := Bech32KeyOutput(info)
|
keyOutput, err := Bech32KeyOutput(info)
|
||||||
|
if err != nil {
|
||||||
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
|
w.Write([]byte(err.Error()))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
keyOutput.Seed = mnemonic
|
keyOutput.Seed = mnemonic
|
||||||
|
|
||||||
output, err := json.MarshalIndent(keyOutput, "", " ")
|
output, err := json.MarshalIndent(keyOutput, "", " ")
|
||||||
|
|
Loading…
Reference in New Issue