You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
msg handlers return an sdk.Result type to the API with one exception: if msg.ValidateBasic() fails, it returns something else. This is because msg.ValidateBasic() is run by the cosmos framework before the msg is processed by the registered handler.
This results in the following two formats being returned by the API, the first is what ValidateBasic() returns and the second is what the handler returns if an error occurs:
"{\"codespace\":\"claim\",\"code\":101,\"message\":\"Invalid claim body, too short: \"}"
"[{"msg_index":0,"success":false,"log":"{\"codespace\":\"claim\",\"code\":102,\"message\":\"Invalid claim body, too long\"}"}]"
msg handlers return an sdk.Result type to the API with one exception: if msg.ValidateBasic() fails, it returns something else. This is because msg.ValidateBasic() is run by the cosmos framework before the msg is processed by the registered handler.
This results in the following two formats being returned by the API, the first is what ValidateBasic() returns and the second is what the handler returns if an error occurs:
Bonus: we can remove this code from modules:
The text was updated successfully, but these errors were encountered: