Set up a more structured system for building errors in hooks.