diff --git a/internal/event/consume/validate.go b/internal/event/consume/validate.go index e25e6a5a..33eafe0b 100644 --- a/internal/event/consume/validate.go +++ b/internal/event/consume/validate.go @@ -36,7 +36,7 @@ var ( // --foreground, --force would silently produce two daemons writing // to the same socket — refuse upfront. ErrForceRequiresForeground = &ValidationError{ - Msg: "--force is only meaningful with --foreground (in daemon mode it would produce multiple bus instances; cloud events would be randomly split across connections). To restart the bus: preview dws event stop --all --dry-run, confirm with --yes, then run dws event consume", + Msg: "--force is only meaningful with --foreground (in daemon mode it would produce multiple bus instances; cloud events would be randomly split across connections). To restart the bus: preview dws event stop --all --dry-run, confirm with dws event stop --all --yes, then run dws event consume", } // ErrJSONFormatRequiresBounded is the plan §3.1 contract: --format diff --git a/internal/event/consume/validate_test.go b/internal/event/consume/validate_test.go index 525e9250..4da7dff0 100644 --- a/internal/event/consume/validate_test.go +++ b/internal/event/consume/validate_test.go @@ -65,7 +65,10 @@ func TestValidate_ForceRequiresForeground(t *testing.T) { if !errors.Is(err, ErrForceRequiresForeground) { t.Fatalf("err = %v, want ErrForceRequiresForeground", err) } - if !strings.Contains(err.Error(), "event stop && dws event consume") { + for _, recoveryStep := range []string{"event stop --all --dry-run", "event stop --all --yes", "event consume"} { + if strings.Contains(err.Error(), recoveryStep) { + continue + } t.Errorf("error message must include the recovery hint, got: %s", err.Error()) }