Skip to content

Use InvalidMessageAction for unmapped message types - #195

Merged
iancooper merged 2 commits into
BrighterCommand:masterfrom
AVTUNEY:docs/4499-unmapped-type-guidance
Oct 5, 2026
Merged

iancooper merged 2 commits into
BrighterCommand:masterfrom
AVTUNEY:docs/4499-unmapped-type-guidance

Conversation

@AVTUNEY

@AVTUNEY AVTUNEY commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Several getRequestType examples throw ArgumentException for an unknown message type. The dispatcher logs and acknowledges that exception, so following the examples can remove the message instead of rejecting it.

The examples now use InvalidMessageAction, as suggested in the issue. This covers the two routing pages and the copies in the FAQ, migration guide, CloudEvents and Agreement Dispatcher pages. The body-routing example also handles malformed JSON and missing or invalid type fields explicitly. The error-handling text now explains that the rejection destination depends on the transport and configuration.

I also fixed the imports and small compilation issues in the examples being changed, including the SQS queue-attributes argument. This is a documentation-only change; Brighter's runtime behavior is unchanged.

Validation:

  • Compiled all 13 updated examples against the released Brighter 10.7.0 packages and exercised their callbacks through both pumps with in-memory transport.
  • Page, link, symbol and documentation compilation checks pass. Existing warnings and skipped blocks remain; no compile-gate exemptions were added.

Fixes BrighterCommand/Brighter#4499

@iancooper
iancooper merged commit 94ad0ed into BrighterCommand:master Oct 5, 2026
6 checks passed
@iancooper

Copy link
Copy Markdown
Member

Thanks @AVTUNEY

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.

An exception from getRequestType, which the docs show for an unmapped type, acknowledges the message instead of rejecting it

2 participants