If you pull the above block out into a `error_classes_for_envelope` method, you'll find you can simplify it, and this method in the process.