Skip to content

Commit

Permalink
Merge pull request #885 from stacklok/entity-event-error
Browse files Browse the repository at this point in the history
`EntityInfoWrapper.BuildMessage`: Return `nil, error`
  • Loading branch information
JAORMX authored Sep 7, 2023
2 parents 10a182e + 63b2fb1 commit a2e4328
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/engine/entity_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ func (eiw *EntityInfoWrapper) BuildMessage() (*message.Message, error) {
}

msg := message.NewMessage(id.String(), nil)
return msg, eiw.ToMessage(msg)
if err := eiw.ToMessage(msg); err != nil {
return nil, err
}

return msg, nil
}

// Publish builds a message.Message and publishes it to the event bus
Expand Down

0 comments on commit a2e4328

Please sign in to comment.