diff --git a/examples/basecoin/x/cool/errors.go b/examples/basecoin/x/cool/errors.go index 707f2ef8c..5db3efc39 100644 --- a/examples/basecoin/x/cool/errors.go +++ b/examples/basecoin/x/cool/errors.go @@ -1,15 +1,17 @@ package cool import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" ) const ( - // Cool module reserves error 300-399 lawl - CodeIncorrectCoolAnswer sdk.CodeType = 300 + // Cool module reserves error 400-499 lawl + CodeIncorrectCoolAnswer sdk.CodeType = 400 ) // ErrIncorrectCoolAnswer - Error returned upon an incorrect guess func ErrIncorrectCoolAnswer(answer string) sdk.Error { - return sdk.NewError(CodeIncorrectCoolAnswer, "Incorrect cool answer") + return sdk.NewError(CodeIncorrectCoolAnswer, fmt.Sprintf("Incorrect cool answer: %v", answer)) }