validate sign tx request's body

Closes: #3176
This commit is contained in:
Alessio Treglia
2018-12-27 14:43:23 +01:00
parent 0d63c92be1
commit 1ebe1844d2
5 changed files with 43 additions and 33 deletions
+1 -1
View File
@@ -189,7 +189,7 @@ func ReadRESTReq(w http.ResponseWriter, r *http.Request, cdc *codec.Codec, req i
err = cdc.UnmarshalJSON(body, req)
if err != nil {
WriteErrorResponse(w, http.StatusBadRequest, err.Error())
WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to decode JSON payload: %s", err))
return err
}