Skip to main content
AutoErrorEventMiddleware emits {OriginalEventType}ErrorEvent when a handler completes with an error.

Constructor params

None.

Setup with EventBus

Behavior

  • Runs on completed handler results.
  • If a handler errored, emits an auto event with:
    • event_type: {OriginalEventType}ErrorEvent
    • error: original exception
    • error_type: exception class name
  • Skips source events ending in ErrorEvent or ResultEvent to prevent auto recursion.