Why this matters
Enables translations and consistent client handling.
Emit stable message keys (for i18n/observability) and resolve user-facing text via localization layers.
Enables translations and consistent client handling.
Side-by-side examples engineers can pattern-match during review.
throw IllegalArgumentException("User not found in system")throw DomainException(code = "user.not_found")error("Payment failed due to ...")error(code = "payment.failed")From the same buckets as this rule.