Skip to content

feat(events): populate ProjectionErrors / ProjectionRebuildErrors on TryCreateUsage#4708

Merged
jeremydmiller merged 2 commits into
masterfrom
feat/ps3-populate-projection-error-handling-descriptors
Jun 9, 2026
Merged

feat(events): populate ProjectionErrors / ProjectionRebuildErrors on TryCreateUsage#4708
jeremydmiller merged 2 commits into
masterfrom
feat/ps3-populate-projection-error-handling-descriptors

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

What

Companion to JasperFx/jasperfx#431 — populates the new descriptor fields on EventStoreUsage from StoreOptions.Projections.Errors and .RebuildErrors inside DocumentStore.EventStore.TryCreateUsage. With these on the wire, downstream monitoring tools (CritterWatch) can render the projection-error policy operators have actually configured and pick the right operator affordance.

Wire field Sourced from
usage.ProjectionErrors Options.Projections.Errors (normal-run config)
usage.ProjectionRebuildErrors Options.Projections.RebuildErrors (rebuild-mode config)

Each descriptor mirrors ErrorHandlingOptions's three flags: SkipApplyErrors, SkipUnknownEvents, SkipSerializationErrors.

Why

JasperFx/ProductSupport#3 — a Marten consumer running with Projections.Errors.SkipApplyErrors = false (stop-on-error policy) was shown a "View Related Dead Letters" button on CritterWatch's projection detail page because CritterWatch had no way to read the policy off the wire and assumed skip-and-DLQ behavior. With this PR (after #431 ships) CritterWatch will be able to render the right affordance per store.

Coordination

Verification

  • New CoreTests/jasper_fx_mechanics.cs test exercises a stop-on-error config end-to-end and asserts both descriptors carry the right values. Passes locally against a local-feed prerelease of JasperFx.Events with the descriptor types in place.

🤖 Generated with Claude Code

…TryCreateUsage

Companion to JasperFx/jasperfx#431 — populates the new descriptor fields on
`EventStoreUsage` from `StoreOptions.Projections.Errors` and `.RebuildErrors`
in `DocumentStore.EventStore.TryCreateUsage`. With these on the wire, downstream
monitoring tools (CritterWatch) can render the projection-error policy
operators have actually configured and pick the right affordance — DLQ
inspection vs "shard halts on error" indicator.

Motivated by JasperFx/ProductSupport#3: a Marten consumer running with
`Projections.Errors.SkipApplyErrors = false` (stop-on-error policy) was
shown a "View Related Dead Letters" button on the projection detail page,
because CritterWatch had no way to read the policy off the wire and
assumed skip-and-DLQ behaviour.

Three flags carry over for each of normal-run and rebuild-mode:
- `SkipApplyErrors`
- `SkipUnknownEvents`
- `SkipSerializationErrors`

`ProjectionRebuildErrors` is populated independently of `ProjectionErrors`
because rebuilds default to stop-on-error even when normal runs skip —
operators rebuilding need to know whether a poison-pill event will halt
the rebuild.

CoreTests pin the new shape via a stop-on-error config: a host with
`Projections.Errors.SkipApplyErrors = false` shows up correctly in the
descriptor, and the (unchanged) rebuild defaults round-trip too.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jeremydmiller

Copy link
Copy Markdown
Member Author

Bumped JasperFx 2.9.1 → 2.9.2 (released to nuget.org) so this PR now compiles against the descriptor types from #431. Holding off on merge per request to bundle other changes (the Weasel.Postgresql 9.1.1 work for #4706 is staged locally and not in this branch). Ready when you are.

@jeremydmiller jeremydmiller merged commit bf0b9e7 into master Jun 9, 2026
8 checks passed
@jeremydmiller jeremydmiller deleted the feat/ps3-populate-projection-error-handling-descriptors branch June 9, 2026 19:25
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.

1 participant