From a69e1235a0b7b02ffecb687ee756c2d4b03418d6 Mon Sep 17 00:00:00 2001 From: Carlton N Hanna Date: Tue, 21 May 2024 15:14:28 -0600 Subject: [PATCH] add error handling --- x/attribute/keeper/msg_server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x/attribute/keeper/msg_server.go b/x/attribute/keeper/msg_server.go index 1d1830a0e..3c09569e7 100644 --- a/x/attribute/keeper/msg_server.go +++ b/x/attribute/keeper/msg_server.go @@ -266,7 +266,9 @@ func (k msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParam } k.SetParams(ctx, msg.Params) - ctx.EventManager().EmitTypedEvent(types.NewEventAttributeParamsUpdated(msg.Params)) + if err := ctx.EventManager().EmitTypedEvent(types.NewEventAttributeParamsUpdated(msg.Params)); err != nil { + return nil, err + } return &types.MsgUpdateParamsResponse{}, nil }