From dccc0d6a45e995409f6c37c72656b5cf4c670e62 Mon Sep 17 00:00:00 2001 From: Adrien Duval <43851820+LeCodeurDuDimanche@users.noreply.github.com> Date: Wed, 9 Jun 2021 12:40:36 +0200 Subject: [PATCH] Fix ReadRESTReq documentation (#9476) The `ReadRESTReq` function documentation stated it `returns true if errors occurred`, when it return false when an error occur Co-authored-by: Marko Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> --- types/rest/rest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/rest/rest.go b/types/rest/rest.go index 80afe2fb61..1f4d1f50c4 100644 --- a/types/rest/rest.go +++ b/types/rest/rest.go @@ -133,7 +133,7 @@ func (br BaseReq) ValidateBasic(w http.ResponseWriter) bool { } // ReadRESTReq reads and unmarshals a Request's body to the the BaseReq struct. -// Writes an error response to ResponseWriter and returns true if errors occurred. +// Writes an error response to ResponseWriter and returns false if errors occurred. func ReadRESTReq(w http.ResponseWriter, r *http.Request, cdc *codec.LegacyAmino, req interface{}) bool { body, err := ioutil.ReadAll(r.Body) if CheckBadRequestError(w, err) {