Refactor error messages into shared partials, using object where possible