my proposal is errors have a small set of keys say, network, crypto, api, fs (suggestions welcome) and then those have properties which are a single camel cased string which identifies the particular error. This would be intended as machine readable, so no changing this once you have made the error.
Seems good to me.