Register a blocked reason. Overwrites existing entries with the same code.
Look up a reason by code. Returns undefined if not registered.
Format a blocked reason with variable interpolation.
Returns a structured result ready for RailBlocked construction. Falls back to generic message for unknown codes — the block itself is already enforced by the rail logic, not by the registry.
Optionalvars: Record<string, string>All registered codes.
Blocked reason registry.
Central catalog of all known blocked/error codes. Pre-seeded with built-in codes, extensible at runtime.