Skip to content

Commit

Permalink
controller: Fix error return during processEvents
Browse files Browse the repository at this point in the history
The return was attempting to return an error from a ctx instead of
the error returned from the previously called function, which results
in a nil pointer dereference.

This was most likely a copy-paste error.
  • Loading branch information
coffeefreak101 committed Apr 19, 2024
1 parent 0bc5c85 commit 2ba0f73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion events/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func (n *NatsController) processEvents(ctx context.Context) error {
if err != nil {
eventAcknowleger.nak()

return errors.Wrap(errProcessEvent, ctx.Err().Error())
return errors.Wrap(errProcessEvent, err.Error())
}

// spawn msg process handler
Expand Down

0 comments on commit 2ba0f73

Please sign in to comment.