ConfigViolation indicates system configuration or routing issues where events are mismatched with their handlers. This occurs separately from contract violations and represents problems with the system topology itself, such as:

  • Events sent to handlers not configured to process them
  • Mismatched event types not covered by handler contracts
  • Configuration conflicts between services

Requires explicit resolution as it indicates fundamental routing or setup issues.

Hierarchy

  • ViolationError<"Config">
    • ConfigViolation

Constructors

Properties

message: string
metadata: null | Record<string, any>

Additional structured data about the violation

name

The error name, formatted as ViolationError This helps with error identification in logs and stack traces

stack?: string
type

The specific type/category of the violation

prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void