Skip to content

fix(hooks): fire remaining hooks after a Hook.Fire error - #1574

Open
VedantMadane wants to merge 1 commit into
sirupsen:masterfrom
VedantMadane:fix-issue-408
Open

fix(hooks): fire remaining hooks after a Hook.Fire error#1574
VedantMadane wants to merge 1 commit into
sirupsen:masterfrom
VedantMadane:fix-issue-408

Conversation

@VedantMadane

Copy link
Copy Markdown

Summary

Fixes #408.

LevelHooks.Fire previously returned on the first hook error, so later hooks never ran (contradicting the doc: fire all hooks for the level).

Now every hook for the level is invoked; errors are combined with errors.Join.

As suggested by the maintainer, this avoids importing a multierror package.

Test plan

  • TestHookFireContinuesAfterError
  • Existing TestHookFireOrder still passes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error in one Hook.Fire() prevents subsequent hooks from firing

1 participant