Creates a new system warning event.
Warning event data
The function/method where the warning occurred
OptionalextraData?: unknownAdditional context about the warning
Human-readable warning message
OptionalshouldNotify?: booleanWhether to send external notifications (defaults to false)
HTTP status code (typically 2xx for warnings)
OptionaluserId?: stringThe user affected (defaults to "system")
Domain event for system warnings.
Remarks
Used to track non-critical issues that don't require immediate action. The shouldNotify flag controls whether external notifications are sent.
Example
See