diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fbd99c24c3..ba140fcca94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -196,6 +196,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/auth) [\#10880](https://github.com/cosmos/cosmos-sdk/pull/10880) Added a new query to the tx query service that returns a block with transactions fully decoded. * (types) [\#11200](https://github.com/cosmos/cosmos-sdk/pull/11200) Added `Min()` and `Max()` operations on sdk.Coins. * (gov) [\#11287](https://github.com/cosmos/cosmos-sdk/pull/11287) Fix error message when no flags are provided while executing `submit-legacy-proposal` transaction. +* (x/auth) [\#11482](https://github.com/cosmos/cosmos-sdk/pull/11482) Improve panic message when attempting to register a method handler for a message that does not implement sdk.Msg ### Bug Fixes diff --git a/x/auth/middleware/msg_service_router.go b/x/auth/middleware/msg_service_router.go index 5254810da30..79aea3350c9 100644 --- a/x/auth/middleware/msg_service_router.go +++ b/x/auth/middleware/msg_service_router.go @@ -67,7 +67,7 @@ func (msr *MsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler inter // We panic here because there is no other alternative and the app cannot be initialized correctly // this should only happen if there is a problem with code generation in which case the app won't // work correctly anyway. - panic(fmt.Errorf("can't register request type %T for service method %s", i, fqMethod)) + panic(fmt.Errorf("unable to register service method %s: %T does not implement sdk.Msg", fqMethod, i)) } requestTypeName = sdk.MsgTypeURL(msg)