(Lower-priority feature split out of T405114: Incorporate type-smart logic into error type comparison and creation.)
Currently there's nothing that looks at the error keys and creates error-type-aware errors, if you say create a Z500 with two string arguments it will create Z500K1 and Z500K2 without looking at the Z500 definition.