Skip to content

Commit

Permalink
Update logging to show success.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Witkowski committed Nov 9, 2023
1 parent f93682d commit b143222
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/trigger/keeper/trigger_dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ func (k Keeper) handleMsgs(ctx sdk.Context, msgs []sdk.Msg) ([]sdk.Result, error
if err != nil {
return nil, fmt.Errorf("error processing message %s at position %d: %w", sdk.MsgTypeURL(msg), i, err)
}
k.Logger(ctx).Debug(fmt.Sprintf("Executed %s at position %d and received result: %s", sdk.MsgTypeURL(msg), i, r))
// Handler should always return non-nil sdk.Result.
if r == nil {
return nil, fmt.Errorf("got nil sdk.Result for message %s at position %d", sdk.MsgTypeURL(msg), i)
}
k.Logger(ctx).Debug(fmt.Sprintf("Successfully executed %s at position %d", sdk.MsgTypeURL(msg), i))

results[i] = *r
}
Expand Down

0 comments on commit b143222

Please sign in to comment.