Skip to content

Commit

Permalink
check the error in event manager
Browse files Browse the repository at this point in the history
  • Loading branch information
technicallyty committed Jan 30, 2025
1 parent 6c23a79 commit 327b41a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/core/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package keeper
import (
"context"
"errors"
"fmt"

"cosmossdk.io/core/event"
errorsmod "cosmossdk.io/errors"
Expand Down Expand Up @@ -421,7 +422,9 @@ func (k *Keeper) RecvPacket(ctx context.Context, msg *channeltypes.MsgRecvPacket
Value: attr.Value,
})
}
k.EventService.EventManager(ctx).EmitKV(e.Type, attrs...)
if err := k.EventService.EventManager(ctx).EmitKV(e.Type, attrs...); err != nil {
return nil, fmt.Errorf("failed to emit error events in RecvPacket: %w", err)
}
}
}
}
Expand Down

0 comments on commit 327b41a

Please sign in to comment.