Unify errors so that they all keep the 'code' attribute, even if known.