Refactor adding content_type errors to base attribute